reset-event-listeners
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

reset-event-listeners

Trace and Reset DOM Element Event Listeners.

Quick example

  let listeners = traceEventListeners(element);
  // add any listeners and/or onhandlers
  element.onclick = DoSomething;
  element.addEventListener("click", DoSomething);
  
  listeners.reset();
  // element.onclick == null;
  // No event listeners attached
 
  // another handlers attached
  listeners.reset();
  // clean

Package Sidebar

Install

npm i reset-event-listeners

Weekly Downloads

0

Version

0.0.2

License

MIT

Last publish

Collaborators

  • alexdrel