-
-
Save sdesai/371724 to your computer and use it in GitHub Desktop.
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); | |
}; | |
Y.mix(Class2, { | |
NAME: "class2", | |
ATTRS: { | |
// Any new attributes Class2 introduces | |
width: {...}, | |
height: {...} | |
} | |
}); | |
Y.extend(Class2, Class1, { | |
// Prototype properties | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment