Event bubbling and event capturing in JavaScript

Опубликовано: 09 Октябрь 2024
на канале: Technical Glitch
521
45

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
Event capturing is opposite to the event bubbling. In event capturing the flow goes from outermost element to the target element.