To prevent any other manipulating of the page content on the client side I could stop events from bubbling up using the stopPropagation function, by embedding this piece of javascript in the page:
Code: Select all
if (document.addEventListener) {
document.addEventListener("DOMContentLoaded", function(ev) {ev.stopPropagation();}, false);
}else if(document.attachEvent){
document.attachEvent("DOMContentLoaded", function(ev) {ev.stopPropagation();});
}else{
document.DOMContentLoaded = function(ev){ev.stopPropagation();};
}
My question is, can I reverse this and prevent this specific embedded script from running, using the surrogate replacement method?