DOM & browser APIs · Concept
Bubbling vs capturing, stopPropagation vs preventDefault
Practise this out loud
Say your answer out loud to an AI interviewer that follows up, and get a score for it.
Practise by voiceThe interviewer asks
Explain the three event phases. Difference between stopPropagation, stopImmediatePropagation and preventDefault? What does { passive: true } do?
Then
Follow-ups the interviewer asks next
- Use cases for capture (outside-click detection, analytics).
- Why passive listeners matter for scroll performance.
mouseentervsmouseover.
The answer
What a strong answer covers
- Capture (window → target), target, bubble (target → window)
preventDefaultcancels the default action, not propagation- Passive listeners promise not to call
preventDefault, so the browser can scroll without waiting
The red pen
Common traps
Avoid:mixing up preventDefault and stopPropagation.
Practise this out loud
Say your answer out loud to an AI interviewer that follows up, and get a score for it.
Practise by voicePractise questions like this out loud
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.