Skip to content

Instantly share code, notes, and snippets.

@linusthe3rd
Created November 18, 2010 13:24
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 linusthe3rd/704962 to your computer and use it in GitHub Desktop.
Save linusthe3rd/704962 to your computer and use it in GitHub Desktop.
(function() {
//set up your widget
dojo.declare("MyTable", dijit._Widget, {
//initiation methods for your widget
destroy: function(){
//destroy your child widgets
dojo.forEach(this._childrenWidgets, function(widget){
widget.destroy();
});
//unsubscribe from topics
dojo.forEach(this._topics, dojo.unsubscribe);
//disconnect from events
dojo.forEach(this._connectHandles, dojo.disconnect);
//run parent destroy() method
this.inherited(arguments);
},
//other methods for your widget
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment