Skip to content

Instantly share code, notes, and snippets.

@zholmquist
Created October 26, 2010 21:46
Show Gist options
  • Save zholmquist/647887 to your computer and use it in GitHub Desktop.
Save zholmquist/647887 to your computer and use it in GitHub Desktop.
Function.prototype.before = function() {
console.debug('before')
};
function someObject()
{
this.before = Function.prototype.before
}
var another_obj = new someInstanceMethod();
another_obj.before();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment