Back to Developer Roadmap

Event Delegation

src/data/question-groups/frontend/content/event-delegation.md

4.0404 B
Original Source

Event delegation is a technique where you define an event handler for a particular event as part of the parent element that contains the elements that will actually trigger the event.

When the event is triggered, it’ll bubble up in the DOM hierarchy until it reaches the parent’s event handler.