Event Bubbling & Capturing
Event Bubbling & Capturing
Section titled “Event Bubbling & Capturing”Introduction
Section titled “Introduction”When an event fires on an element, it propagates through the DOM tree in three phases: capturing (down), target (at), and bubbling (up).
Topics Covered
Section titled “Topics Covered”- Bubbling — Events propagate up from the target by default
- Capturing — Listening during the capture phase
- stopPropagation — Halting event propagation
Summary
Section titled “Summary”Capturing (down) → Target → Bubbling (up). Default listeners run in bubbling phase. { capture: true } for capturing phase. stopPropagation() halts propagation.