capturing handler

JSbrowsereventhandlerregister ⟩ capturing handler

set the third argument to addEventListener() to true:

// capturing event handler ----------------> ╭──╮
container.addEventListener("click", handler, true);

If you want to remove a capturing event handler, you must also pass true as the third argument to removeEventListener().

// remove capturing handler ------------------> ╭──╮
container.removeEventListener("click", handler, true);

Last updated