Skip to content

QuizNot attempted

Capture vs bubble

In what order do the phases of a click on a nested button happen?
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 window down to the target's parent, the target phase, then bubble back up to window
  • { 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.