Hi,
I am using an addon that blocks specific JavaScript functions on a website. Whether a function should be blocked or not will be determined by the name of the function. (Black-list approach)
Here is the code that is used for this:
...
document.addEventListener('beforescriptexecute', onBeforeScriptExecuteHandler);
...
var onBeforeScriptExecuteHandler = function(ev) {
if ( myTestFunction(ev.target.textContent) ) {
ev.preventDefault();
ev.stopPropagation();
}
};
This code works fine, but my question is:
I heard through the grapevine that within this new WebExtentions / Electrolysis stuff, using document.addEventListener resp. listening to ‘beforescriptexecute’ in an addon will not be possible any more, hence I cannot stop specific scripts from executing on a webseite. Is this correct?