This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
YUI.add('root-cls', function (Y) { | |
Y.Base._buildCfg.aggregates.push('getClassAttrs'); | |
Y.rootClass = Y.Base.create('root-class', Y.Base, [], { | |
someInstanceMethod : function () {} | |
}, { | |
ATTRS : { | |
test : { | |
validator : Y.Lang.isBoolean | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The idea behind ATTRS, is that Base will take care of | |
// setting up the attributes defined in ATTRS for each | |
// subclass. So, you don't need to do anything special | |
// for Class2's ATTRS definition. | |
// Changing Class2 to this should take care of it. | |
var Class2 = function(config) { | |
Class2.superclass.constructor.apply(this, arguments); | |
}; |