Last active
December 10, 2015 15:18
-
-
Save stlsmiths/4453632 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
BaseView = Y.Base.create('baseview', Y.View,[],{ | |
// | |
// my awesome BaseView statics and methods | |
// | |
},{ | |
ATTRS:{ | |
// | |
// my awesome BaseView ATTRS | |
// | |
} | |
}); | |
// OPTION 1 - extend the already extended BaseView | |
ViewA = Y.Base.create('viewA', BaseView,[],{ | |
// | |
// awesome ViewA statics/methods that replaces some BaseView stuff and adds new stuff | |
// | |
},{ | |
ATTRS:{ | |
// | |
// awesome ViewA ATTRS that replaces some BaseView stuff and adds new stuff | |
// | |
} | |
}); | |
// OPTION 2 - extend View and include BaseView as extension | |
ViewA = Y.Base.create('viewA', Y.View, [BaseView], { | |
// | |
// awesome ViewA statics/methods that replaces some BaseView stuff and adds new stuff | |
// | |
},{ | |
ATTRS:{ | |
// | |
// awesome ViewA ATTRS that replaces some BaseView stuff and adds new stuff | |
// | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment