Created
July 26, 2022 03:17
-
-
Save szaranger/96b994d3ab6d9ae81a738a108fe9659c to your computer and use it in GitHub Desktop.
This file contains hidden or 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.querySelector('#myButton').addEventListener('click', e => { | |
| e.currentTarget; // Type is EventTarget | |
| const button = e.currentTarget as HTMLButtonElement; // buttonType is HTMLButtonElement | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment