Sad trombone

ExtJS' callParent() + 'use strict'

by Walter Rumsby

HTML

<p>Read <a href="http://www.sencha.com/forum/showthread.php?132503-INVALID-EXTJSIV-1859-callParent()-breaks-Firefox-when-using-js-strict-mode">this</a> and weep.</p>

JavaScript

(function () {
    // we can't 'use strict'; here because this.callParent goes BOOM!
    
    Ext.define('My.Component', {
        extend: 'Ext.Component',
        
        constructor: function (config) {
            this.callParent([config]);
        },
        
        onRender: function () {
            var el = this.getEl();
            
            el.update('holleriffic');
        }
    });
}());
    
(function () {
    'use strict';
    
    Ext.create('My.Component', {
        renderTo: Ext.getBody()
    });
}());