Skip to content

Instantly share code, notes, and snippets.

@townivan
Created February 17, 2023 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save townivan/5b9aeaee61eecdd5a87f31c2ef86043a to your computer and use it in GitHub Desktop.
Save townivan/5b9aeaee61eecdd5a87f31c2ef86043a to your computer and use it in GitHub Desktop.
Events bubble by default. So the difference between the two is:
target is the element that triggered the event (e.g., the user clicked on)
currentTarget is the element that the event listener is attached to.
source: https://stackoverflow.com/a/10086501/1735394
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment