Last active
March 18, 2018 10:55
-
-
Save a1exlism/1f803802f11a36eda9235f21834106f8 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
// stop capture | |
ul.addEventListener('click', function(e) { | |
if(e.currentTarget === e.target) { | |
console.log(e.target); | |
} | |
}); | |
// stop bubbling | |
li.addEventListener('click', function(e) { | |
console.log(e.currentTarget); | |
e.stopPropagation(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment