Created
November 21, 2018 00:18
-
-
Save joshcp/f478ee5dd55e61f7e38d7c41d409b888 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for(let elem of document.querySelectorAll('*')) { | |
elem.addEventListener("click", e => console.log(`Capturing: ${elem.tagName}`), true); | |
elem.addEventListener("click", e => console.log(`Bubbling: ${elem.tagName}`)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment