54/361

Describe event bubbling.

Quiz · JavaScript
Medium
3 min
javascript

When an event triggers on a DOM element, it will attempt to handle the event if there is a listener attached, then the event is bubbled up to its parent and the same thing happens. This bubbling occurs up the element's ancestors all the way to the document. Event bubbling is the mechanism behind event delegation.

Adapted from the Front End Interview Handbook by Yangshun Tay and contributors (MIT License). Source

Spotted a mistake or a rights concern? Report an issue