Skip to content

Instantly share code, notes, and snippets.

@rgrove
Created June 16, 2010 22:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rgrove/441343 to your computer and use it in GitHub Desktop.
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
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