Event Bubbling
Definition
The DOM event propagation pattern where an event triggered on a child element propagates upward through its ancestors. This allows event delegation — attaching a single listener to a parent to handle events on its children.
Code Example
Javascript
Tip: Modify the code above and click “Run” to see the results
Learn More
Related Terms
DOM
Document Object Model — a tree-structured representation of an HTML document that allows JavaScript to read and manipulate page content, structure, and styles. Every HTML element becomes a node in the DOM tree.
Event ListenerA function attached to a DOM element that executes when a specific event (click, keypress, submit, etc.) occurs on that element. Added with addEventListener and removed with removeEventListener.