Force DOM in "verified mode"

In Chrome, if you right-click on a DOM element and select "check element", one of them is displayed on the "Elements" tab of the debugger. In addition, the JavaScript variable is $0populated with a “verified” DOM element.

Given the DOM element, is there a way to get JavaScript to force the browser to “check” it so that the browser fills in the value for it $0initially without performing the assignment itself?

+5
source share
1 answer

As written in the documentation , the Chrome web developer supports the Firebug command-line API . And one of the methods available here is inspect , which does what you want.

Unfortunately, this is a command line API, which means that it is only valid in the console, on the command line, and not in scripts on the page. It is not possible to control the web developer tool on the script page, except through the Console API , which provides mainly logging facilities.

+5
source

All Articles