I rewrite one of the main javascript methods:
Element.prototype._removeChild = Element.prototype.removeChild;
Element.prototype.removeChild = function(){
callback();
this._removeChild.apply(this,arguments);
}
I want to dynamically get the method name (in this case "removeChild") from within the dynamically rewritten function. I use arguments.callee.name, but it seems to return nothing, thinking it is just an anonymous function. How to get the name of the function to which the anonymous function is assigned?
source
share