Skip to content

Instantly share code, notes, and snippets.

@rwaldron
Created October 21, 2010 22:12
Show Gist options
  • Save rwaldron/639467 to your computer and use it in GitHub Desktop.
Save rwaldron/639467 to your computer and use it in GitHub Desktop.
Per wycats suggestion to overwrite function.prototype.call
var originalCall = (function () {
return Function.prototype.call;
})();
Function.prototype.call = function () {
console.log(arguments);
return originalCall;
}
function testFn(arg) {
return arg;
}
testFn('foo stringy bar thingy');
testFn('still logging');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment