Understanding Event Bubbling and Capturing in Javascript


Events in the DOM tree are first captured down to the target, then bubble up.

Source Code

// Stop event bubbling
element.addEventListener('click', function(event) {
  event.stopPropagation();
});
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments