I override a number of methods on the Element prototype so I can add in a custom hook like so:
Element.prototype._method = Element.prototype.method;
Element.prototype.method = function(){
this._method.apply(this, arguments);
// custom callback
}
At some point, I want to restore the original method, so I do:
Element.prototype.method = Element.prototype._method;
However, when the method element is called on a node, it seems to throw a Invalid procedure call or argument error in IE8. Am I restoring the original method incorrectly?
It seems IE8 has this issue and is not quite easy to resolve, but you could try
deleteonElement.prototypeto restore an overwritten.