Extending Objects in Ext JS


Last time we explored JavaScript object extension we dove into the most popular JavaScript library in the known universe, jQuery. This time around we’ll be looking at Ext JS, a framework I’ve been using quite a bit lately. Ext JS relies on this capability all over the place. Especially when you want to create your own customizable components.

And the output:

You’re welcome to click back or open a new tab to compare this to the previous post, but this is different from the jQuery example. The single difference is that the desc property doesn’t exist in our extended object. Ext JS has decided that a property with a null value will overwrite a previous value (see title), but an undefined value will in effect erase the property.

For more information: Function-method-apply

Extending Objects in jQuery