Is there any event in Internet Explorer, that is fired whenever DOM is changed? For example:
document.attachEvent(\"ondocumentchange\", function () {
ale
Off the top of my head, this might work:
document.body.attachEvent('onpropertychange', function(event) {
if (event.propertyName !== 'innerHTML') return;
alert("you've just changed DOM!");
});
This relies on IE's proprietary [onPropertyChange event](http://msdn.microsoft.com/en-us/library/ms536956(VS.85).aspx) — since the document's innerHTML would change whenever a node is inserted. But:
It might not work with certain types of properties. I imagine innerHTML would function like a "getter" in that it'd only get recalculated when retrieved.
It would also pick up a lot of false positives — lots of other things would modify the innerHTML that would have nothing to do with node insertion. You could mitigate this by listening on a particular element, rather than document-wide.