Skip to main content

What is Event Propagation?

Event propagation refers to the way that events are processed in an HTML document. When an event is triggered on an element, it can be processed in two ways:

  1. Capturing phase: The event starts at the top of the document and is propagated down to the element that triggered the event.
  2. Bubbling phase: The event starts at the element that triggered the event and is propagated up to the top of the document.