Watch events capture, target, and bubble through the DOM — interactive step-through
When an event occurs on a DOM element, it doesn't just fire on that element. It goes through three phases:
window → document → ... → parent of target. Listeners with capture: true fire here.document → window. Most listeners fire here (default).Prevents the event from continuing to the next element in the propagation path. Other listeners on the same element still fire.
Prevents the event from continuing AND prevents other listeners on the same element from firing.
Instead of attaching listeners to every child, attach one listener to a parent and use event.target to identify which child was clicked. Reduces memory and works for dynamically added elements.
event.target — the element that was actually clicked (doesn't change)event.currentTarget — the element whose listener is currently firing (changes during propagation)event.eventPhase — 1 (capturing), 2 (target), 3 (bubbling)event.bubbles — whether this event type bubbles (most do, focus/blur don't)