Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cherniag/54773a66af3ad152d6451ff68f0bfaca to your computer and use it in GitHub Desktop.
Save cherniag/54773a66af3ad152d6451ff68f0bfaca to your computer and use it in GitHub Desktop.
How can I inspect html element that disappears from DOM on lost focus?
type this in the Console:
setTimeout(() => { debugger; }, 5000)
Then you've got 5 seconds (or change the value to anything else) to make whatever you want to debug appear.
None of the other answers worked for me - the DOM tree kept getting modified (i.e. stuff I care about disappeared) right before the script paused.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment