Skip to content

Instantly share code, notes, and snippets.

@kevinweber
Last active December 9, 2016 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevinweber/21140fd655d9790340e4648cd2cdc4bb to your computer and use it in GitHub Desktop.
Save kevinweber/21140fd655d9790340e4648cd2cdc4bb to your computer and use it in GitHub Desktop.
Monitor events associated with DOM elements (for debugging only)
// See also: https://developers.google.com/web/tools/chrome-devtools/debug/command-line/events
monitorEvents(document.body); // logs all events on the body
monitorEvents(document.body, 'mouse'); // logs mouse events on the body
monitorEvents(document.body.querySelectorAll('input')); // logs all events on inputs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment