73/361

Explain event delegation

Quiz · JavaScript
Medium
3 min
javascript

Event delegation is a technique involving adding event listeners to a parent element instead of adding them to the descendant elements. The listener will fire whenever the event is triggered on the descendant elements due to event bubbling up the DOM. The benefits of this technique are:

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