DOM Event Bubbling
Question
In event bubbling, where does the event propagate?
Hint
Think of a bubble rising to the surface.
Explanation
In event bubbling, the event starts at the target element and propagates up through ancestors to the document root. For example, a click on a button inside a div triggers the button handler first, then the div handler, then body, then document. The opposite is event capturing (root to target). You can stop propagation with event.stopPropagation().
Related Resources
Related Lessons
- DOM Manipulation
Learn DOM manipulation.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.