Created
June 16, 2010 22:10
-
-
Save rgrove/441343 to your computer and use it in GitHub Desktop.
A (possibly terrible) way to aggregate all ATTR definitions in a Y.Base hierarchy from the class level, pre-instantiation
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.use('base-base', function (Y) { | |
function A() {} | |
Y.extend(A, Y.Base, {}, { | |
ATTRS: { | |
foo: {value: 'foo'} | |
} | |
}); | |
function B() {} | |
Y.extend(B, A, {}, { | |
ATTRS: { | |
bar: {value: 'bar'} | |
} | |
}); | |
function C() {} | |
Y.extend(C, B); | |
console.dir(C.prototype._getAttrCfgs.apply(C.prototype)); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment