Skip to content

Instantly share code, notes, and snippets.

@alexlehm
Created February 3, 2014 13:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexlehm/8784013 to your computer and use it in GitHub Desktop.
Save alexlehm/8784013 to your computer and use it in GitHub Desktop.
calllogging
(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