Skip to content

Instantly share code, notes, and snippets.

@ifyour
Created June 10, 2017 02:01
Show Gist options
  • Save ifyour/b950b2d26b3f560ea391a01553f15b7a to your computer and use it in GitHub Desktop.
Save ifyour/b950b2d26b3f560ea391a01553f15b7a to your computer and use it in GitHub Desktop.
document.querySelectorAll('*').forEach(
function(domTarget) {
domTarget.addEventListener('click', function(e) {
console.log(e.target);
e.stopPropagation();
});
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment