Created
March 3, 2017 21:57
-
-
Save ryanve/6a702cbaada0a7772799a49c55ed6474 to your computer and use it in GitHub Desktop.
Log :focus element whenever focus changes
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.addEventListener('focusin', function() { | |
console.log(document.activeElement) | |
}, false) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Related: log-tab-focus.js