Skip to content

Instantly share code, notes, and snippets.

@m-gagne
Created January 30, 2012 19:15
Show Gist options
  • Save m-gagne/1706076 to your computer and use it in GitHub Desktop.
Save m-gagne/1706076 to your computer and use it in GitHub Desktop.
Method that returns a boolean indicating if the widget has been destroyed. Useful when your widget relies on async operations and where it could have been destroyed before the callback was run.
_isDestroyed: function() {
var widget = this.element.data( this.widgetName );
return (typeof widget) === 'undefined' || widget === null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment