To use the Developer Tool to find out what elements appear only while the mouse cursor is on

Asked 1 years ago, Updated 1 years ago, 147 views

How can I select a dynamically generated DOM when I can't select it with my mouse?

For example, in the recent PC version of Twitter, if you hover your mouse over the link to someone else's account name, such as someone else who is tweeting on a timeline, it pops up and displays information about the tweeter or RTed person.It's exactly like the following.
Like This
If you take your mouse to the account name link like a red circle, a blue box-like pop-up will appear.

However, this pop-up disappears when the mouse goes out of the pop-up.
As a result, the pop-up disappears before pressing the element selection button below, so the DOM is not found.
Element Select Button

I don't know everything because it hasn't been long since I developed the web.
I think I can use something like a breakpoint to pick up a DOM with these dynamic and disappearing elements, but I don't know how to do it.
Please let me know.

javascript google-chrome

2022-09-30 21:14

3 Answers

The debugger function stops JavaScript from running.
It seems that both Firefox and Chrome have F8 assigned to the pose.
(With Firefox, you can't even select elements with a mouse while posing.)


2022-09-30 21:14

As a separate solution using element selection mode, right-click on the element and select "Verify" to select the element (display the developer tool if necessary).The menu closes when "Verify" is selected, but if the mouse cursor is on the developer tool or outside the window at this point, no mouse-related events will occur, thus avoiding the disappearance of the element.


2022-09-30 21:14

You can place your mouse cursor over the element in your browser and then press the shortcut key (Ctrl+Shift+C) to bring it to the selected state.
If the hover is removed in this state, the element will disappear, so you can press the shortcut key again and go to Developer Tools.


2022-09-30 21:14

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.