Skip to content

Instantly share code, notes, and snippets.

@sdesai
Forked from sergi/gist:371650
Created April 19, 2010 22:17
Show Gist options
  • Save sdesai/371724 to your computer and use it in GitHub Desktop.
Save sdesai/371724 to your computer and use it in GitHub Desktop.
// 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