Skip to content

Instantly share code, notes, and snippets.

@mocheng

mocheng/override

Created Jun 22, 2011
Embed
What would you like to do?
override object method and recover it.
var foo = obj.foo;
obj.foo = function() {
// do something
obj.foo = foo;
obj.foo(arguments);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment