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 standard DOM Events describes 3 phases of event propagation:
When an event happens on an element, it first runs the handlers on it, then on its parent, then all the way up on other ancestors.
When an event happens on an element, it first runs the handlers on it, then on its children, then all the way down on other descendant.