QuizNot attempted
Capture vs bubble
1–4 to choose, Enter to submit
Show answer & explanation
Correct answer:
- Capture (window → target), target, bubble (target → window)
- DOM events propagate in three phases: capture from
windowdown to the target's parent, the target phase, then bubble back up towindow { capture: true }listens on the way down.- Not bubble then capture: capture always comes first.
- Not 'only bubble unless preventDefault': preventDefault cancels the default action, it doesn't affect phases.
- Not target first: the event travels down before it reaches the target.