Skip to content

Instantly share code, notes, and snippets.

@3n
Created October 21, 2008 20:05
Show Gist options
  • Save 3n/18404 to your computer and use it in GitHub Desktop.
Save 3n/18404 to your computer and use it in GitHub Desktop.
Events.implement({
addEventOnce: function(type, func){
this.addEvent(type, function(){ func(); this.removeEvent(type, arguments.callee) })
return this
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment