Created
April 15, 2022 08:13
-
-
Save xkomiks/a765f53d2f5ec85f0cc31e8e9f8bd270 to your computer and use it in GitHub Desktop.
Console logging the focused element as it changes
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.addEventListener('focus', () => { | |
console.log('focused: ', document.activeElement) | |
}, true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment