Skip to content

Instantly share code, notes, and snippets.

@stlsmiths
Last active December 10, 2015 15:18
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 stlsmiths/4453632 to your computer and use it in GitHub Desktop.
Save stlsmiths/4453632 to your computer and use it in GitHub Desktop.
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