Created
January 15, 2009 03:14
-
-
Save gcr/47246 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
function gbDocument(docname) { | |
/* ..... */ | |
this.destroy = function() { | |
// We've been destroyed! Best clean up our actions. | |
pagehandler.removeDoc(this.name, $(".tablist")); | |
console.log("I'm being deleted!"); | |
console.log(this); | |
return undefined | |
} | |
} | |
/* To be used like: */ | |
session.documents['document name here'] = new gbDocument('document name here'); | |
/* Then I'd use that document, when it's not needed: */ | |
session.documents['document name here'] = session.documents['document name here'].destroy(); | |
// Doesn't delete this, just sets it to undefined |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment