🔰capturing phase
The optional third argument to addEventListener() is a boolean value or object. If you pass true, then the handler is registered as a capturing event handler.
If you want to remove a capturing event handler, you must also pass true as the third argument to removeEventListener().
⚠️ event.target's capturing handlers are NOT invoked❗️
capturing handlers can be used:
for debugging
to filter events so that the target event handlers are never actually invoked.
for handling mouse drags.
Last updated