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:
- Capturing phase: The event starts at the top of the document and is propagated down to the element that triggered the event.
- Bubbling phase: The event starts at the element that triggered the event and is propagated up to the top of the document.