Created
January 14, 2022 20:53
-
-
Save GitHubEmploy/0b73f597e7be1853ac702a980965642d 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
const elementIsInFocus = (el) => (el === document.activeElement); | |
elementIsInFocus(anyElement) // Result: If it is in focus, it will return True, otherwise it will return False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment