Explain DOM event capturing and bubbling with addEventListener

Tests DOM event propagation and addEventListener phase selection. Core: capture moves root-to-target, bubble moves target-to-root, useCapture or options.capture sets it. Red flag: saying events only bubble or confusing stopPropagation with preventDefault.
Tests your understanding of the DOM event propagation lifecycle and precise addEventListener API usage. A strong answer explains that capture phase travels from the document root down to the event target, while bubble phase travels from the target back up to the root, and that addEventListener accepts a boolean useCapture flag or an options object with a capture property to select the phase. Red flag: believing all events bubble, not knowing that capture runs first, or confusing event propagation cancellation with default action prevention.
Read the original → developer.mozilla.org
- #dom
- #events
- #javascript
- #addEventListener
- #propagation
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.