Skip to content

Instantly share code, notes, and snippets.

@robmazan
Created November 2, 2020 15:32
Show Gist options
  • Save robmazan/7feed42782f0b1c003d87be12d2272b1 to your computer and use it in GitHub Desktop.
Save robmazan/7feed42782f0b1c003d87be12d2272b1 to your computer and use it in GitHub Desktop.
Debug focus changes in browser
setInterval(() => (window.prevFocus !== document.activeElement) && (console.log(document.activeElement),window.prevFocus=document.activeElement), 500)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment