Created
March 12, 2020 12:21
-
-
Save Seth-Carter/ad4976ed7e9aaad2cf2c941d80883978 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
function handleBuyButtonClick(event) { | |
console.log('You clicked a button!'); | |
const button = event.target; | |
// console.log(button.textContent); | |
// console.log(parseFloat(event.target.dataset.price)); | |
console.log(event.target); | |
console.log(event.currentTarget); | |
console.log(event.target === event.currentTarget); | |
// Stop this event from bubbling up | |
// event.stopPropagation(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment