Created
October 21, 2010 22:12
-
-
Save rwaldron/639467 to your computer and use it in GitHub Desktop.
Per wycats suggestion to overwrite function.prototype.call
This file contains 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
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