Created
February 16, 2021 02:23
-
-
Save phamhieu/b557f83ba6473fd7354141492ec264bf to your computer and use it in GitHub Desktop.
How to inspect disappearing element in a browser?
This file contains hidden or 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
| 1. Open console | |
| 2. Type in setTimeout(()=>{debugger;},5000); | |
| 3. Press Enter | |
| Now you have 5 seconds to make your element appears. Once it appeared, wait until the debugger hits. As long as you don't resume, you can play with your element and it won't disappear. | |
| Useful tip to avoid repeating those steps above every time: | |
| add this as a bookmarklet: | |
| 1. Bookmark any page | |
| 2. Edit this new bookmark | |
| 3. Replace the URL/location with: javascript:(function(){setTimeout(()=>{debugger;},5000);})(); | |
| 4. Next time you wish to use this, just click/tap this bookmark. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment