Last updated 2 years ago
Was this helpful?
browser ⟩ event ⟩ propagation
the process by which the browser decides which objects to trigger event handlers on.
3 phases of event propagation:
(“capturing” phase) occurs before the target handlers are invoked.
target handlers invoked.
(“bubbling” phase) event bubbling.
most events to the object, and then to the object, notable exceptions are the “focus” “blur,” and “scroll” events.
The capturing phase is like the bubbling phase in reverse.
capturing handlers of the object are invoked first.
bubbling phase
hide or not to hide?
stop propagation
JavaScript The Definitive Guide (15.2 Events)
Window
Document
Element
register handler
⚠️ event target's capturing handlers are NOT invoked.