capturing handler
JS โฉ browser โฉ event โฉ handler โฉ register โฉ 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
Was this helpful?