Created
September 26, 2012 17:55
-
-
Save stlsmiths/3789508 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
Y.MyAwesomeView = Y.Base.create('myview',Y.View,[],{ | |
// static props and methods | |
},{ | |
// attrs and stuff | |
}); | |
// referring to http://yuilibrary.com/yui/docs/api/classes/Base.html#method_create | |
// | |
// what is the diff | |
// Case A - is THIS legal?, or does the 2nd arg have to be a Core component (or Y.Base) | |
Y.MyOneOffView = Y.Base.create('myview1', Y.MyAwesomeView,[],{ | |
// even more great static stuff here .... | |
},{ | |
// and more better ATTRS here | |
}); | |
// and Case B | |
Y.MyOneOffView = Y.Base.create('myview1', Y.View, [ Y.MyAwesomeView ], { | |
// even more great static stuff here .... | |
},{ | |
// and more better ATTRS here | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment