Skip to content

Instantly share code, notes, and snippets.

@robin-drexler
Last active August 29, 2015 14:24
Show Gist options
  • Save robin-drexler/d4d167f1aa0bd94094e2 to your computer and use it in GitHub Desktop.
Save robin-drexler/d4d167f1aa0bd94094e2 to your computer and use it in GitHub Desktop.
dom dispatch phases
function listen(){};
// register for capture phase
// 3rd param useCapture is set to true
someDomElement.addEventListener('click', listen, true);
// register for bubble phase
// 3rd param useCapture is set to false (default)
someDomElement.addEventListener('click', listen, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment