Whenever you evaluate some code on a verified page using the DevTools console, DevTools issue a bunch of helper calls known as the command line APIs . This API includes a call to inspect (), which has the same effect as if the user called "Inspect Element" from the context menu, i.e. Raised the "Elements" panel and selected node. The inspect () call along with the rest of the command line API is available for code evaluated using the DevTools extensions using chrome.devtools.inspectedWindow.eval (), so you can do things like:
chrome.devtools.inspectedWindow.eval("inspect(document.body)");
, "" (.. DOM, "" ), , API. , script.