Ext.apply
- Ext.apply copies all attributes of one object to another.
- Ext.apply is often used at the beginning of constructors to copy configuration arguments to the this scope.
- The new keyword creates a new blank object in the scope of this.
- You can also supply a 3rd argument as a default configuration.
var dest = {};
var source = {test: 'abc', sample: 123};
Ext.apply(dest, source);