Is it possible to remove all event handlers of a given element in javascript? - Stack Overflow
According to this thread, you can use cloneNode to strip all the event listeners from a javascript element, like so:
var new_element = old_element.cloneNode(true); old_element.parentNode.replaceChild(new_element, old_element);Read full article from Is it possible to remove all event handlers of a given element in javascript? - Stack Overflow
No comments:
Post a Comment