Event Bubbling
noun
say it: “ih-VENT BUB-ling” /ɪˈvɛnt ˈbʌblɪŋ/
An event traveling from the element it happened on up through each of its parent elements.
What is Event Bubbling in JavaScript?
Event Bubbling — The phase in which an event moves from its target up through ancestor elements.
list.addEventListener("click", event => {
const item = event.target.closest("li");
selectItem(item);
});
In a sentence
- “Because of event bubbling, a click on the button also reaches the list around it.”
Level: Freelancer · More JavaScript terms at this level
Updated