Skip to content

Instantly share code, notes, and snippets.

@kentcdodds
Created March 27, 2018 03:54
Show Gist options
  • Save kentcdodds/0bc725f1086209a1440f1270ac1969e3 to your computer and use it in GitHub Desktop.
Save kentcdodds/0bc725f1086209a1440f1270ac1969e3 to your computer and use it in GitHub Desktop.
activeElement logger bookmarklet
javascript:(function(){if(window._activeElInterval){clearInterval(window._activeElInterval);delete window._activeElInterval;}else{var activeEl;window._activeElInterval=setInterval(function(){var currentActiveEl=document.activeElement;if(currentActiveEl!==activeEl){activeEl=currentActiveEl;console.log(activeEl);}},200);}})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment