Created
January 30, 2012 19:15
-
-
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.
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
_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