I have written following code to alert messages when Node.prototype.appendChild(obj) is called.
var _appendChild = Node.prototype.appendChild;
Node.prototype.appendChild = function(object){
alert("append");
return _appendChild.apply(this,[object]); ;
};
And it does not work in IE8..
I have read this link in which the answer said prototype functions can’t be overridden in IE
How do I override javascript's cloneNode?
But I still want to ask if there is any work around to do what I want.
Thanks
Thanks kennebec
Finally I found I could not implement it just because it was running in quirks mode…
I wrote an example in which somebody else may be interested .