Created
December 9, 2019 10:11
-
-
Save pavlosvos/a2c83f1b0db3e581ed0595c0ec617a0d to your computer and use it in GitHub Desktop.
JS snippet prints out to console elements in the dom clicked .
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
document.body.addEventListener('click', clickedItem); | |
function clickedItem(e){ | |
console.log('clicked item'); | |
console.log(e.target); | |
console.log(e.typeOf); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment