Created
August 27, 2012 20:24
-
-
Save apipkin/3491970 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
| YUI.add(NAME, function(Y){ | |
| Y.MyWidget = Y.Base.create(NAME, Y.Widget, [], { | |
| initializer: function() { | |
| // set up anything initially that's not handled with the config | |
| }, | |
| destructor: function() { | |
| // tear down any thing that needs it | |
| // dom and dom events will be detached automatically | |
| }, | |
| renderUI(): function() { | |
| // build HTML | |
| // attach to this.get('contentBox') | |
| }, | |
| bindUI(): function() { | |
| // event listeners for internal use | |
| // this.after('attrNameChange', this._afterAttrNameChange, this) | |
| // this.get('boundingBox').delegate('click', this._onClick, '*', this) | |
| }, | |
| syncUI(): function() { | |
| // sycronize the ui with anything that needs it after | |
| // building and binding | |
| // call this to update the markup if needed not renderUI() again | |
| } | |
| }, { | |
| ATTRS: { | |
| } | |
| }); | |
| }, '@VERSION@', { requires: [] }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment