What is an event bubbling in JavaScript ?
- Event bubbling is a way of event propagation in the HTML DOM API, when an event occurs in an element inside another element, and both elements have registered a handle for that event. With bubbling, the event is first captured and handled by the innermost element and then propagated to outer elements.
- The execution starts from that event and goes to its parent element. Then the execution passes to its parent element and so on till the body element.