Skip to content

Instantly share code, notes, and snippets.

@jcicero518
Created June 10, 2016 22:14
Show Gist options
  • Save jcicero518/cf7bc861b8885cfe7aed04efdf21e4a5 to your computer and use it in GitHub Desktop.
Save jcicero518/cf7bc861b8885cfe7aed04efdf21e4a5 to your computer and use it in GitHub Desktop.
/*
DOM event delegation is a mechanism of responding to ui-events via a single common parent rather
than each child, through the magic of event "bubbling" (aka event propagation).
When an event is triggered on an element, the following occurs:
The event is dispatched to its target EventTarget and any event listeners found there are triggered.
Bubbling events will then trigger any additional event listeners found by following
the EventTarget's parent chain upward, checking for any event listeners registered
on each successive EventTarget. This upward propagation will continue up to and including the Document.
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment