Created
February 3, 2014 13:43
-
-
Save alexlehm/8784013 to your computer and use it in GitHub Desktop.
calllogging
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
(function () { | |
var oldCall = Function.prototype.call; | |
var newCall = function(self) { | |
Function.prototype.call = oldCall; | |
console.log('Function called:', this.name); | |
var args=Array.prototype.slice.call(arguments,1); | |
Function.prototype.call = newCall; | |
this.apply(self, args); | |
} | |
Function.prototype.call = newCall; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment