Skip to content

Instantly share code, notes, and snippets.

@ZeroBugBounce
Created August 27, 2014 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ZeroBugBounce/f83f73d35d8160f7a3d0 to your computer and use it in GitHub Desktop.
Save ZeroBugBounce/f83f73d35d8160f7a3d0 to your computer and use it in GitHub Desktop.
Track the current active element (focused) in 100ms intervals
storage = { }; setInterval(function() {
if(storage.activeElement !== document.activeElement) {
storage.activeElement = document.activeElement;
console.log('new active element: %o', document.activeElement);
}
}, 100);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment