Is it possible to somehow reset all the event handlers / listeners, attached in course of execution of JavaScript code on the page to their default values, i.e. disabling all the custom functionality, as if the page was loaded without JavaScript support?
I know that I can, for example, reset handlers on individual elements with JQuery's $(selector).off()
, but when yet another "clever" site overrides right click, Ctrl+A, Ctrl+arrows or anything like that and I just want to turn it all off — sometimes I'm not very inclined to dig through their code to find out what they've attached it to, and would love a simpler, one-size-fits-all solution. Is there one?
UPDATE: Found similar question Remove All Event Listeners of Specific Type — where an accepted answer states that it's impossible for a specific event type. Is it still true as of 2016?