How will you remove all events handlers (of a type eg : all handlers for 'click') using only plain javascript ? [No Jquery/framework suggestion please]
https://plainjs.com/javascript/events/binding-and-unbinding-of-event-handlers-12/ explains how to remove a handler IF you got a "pointer" on the handler.
I don't have a(ll) pointers. I just want to remove all existing handlers whatever they could be.
The final aim is to replace a(ll) click handlers by my version. Triggering my handler before the others would be a valid solution for my personal case but I guess others will be more interested in removing handlers
EDIT
So the answer is :
if you want to remove all handlers => clone the node (and maybe "save" its child before doing it)
if you want to remove all handlers of a type => you can't (do it reliably)