Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var oldDescr = Object.getOwnPropertyDescriptor(Element.prototype, "innerHTML");
- Object.defineProperty(Element.prototype, 'innerHTML',
- {
- set: function(htmlVal)
- {
- document.write("CATCH!");
- oldDescr.set.call(this, htmlVal);
- }
- });
- document.getElementById("foobar").innerHTML = "HEHE";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement