Is there any way to inspect a non-active chrome tab within an extension to see the JavaScript-rendered DOM elements?

37 views Asked by At

I am trying to build a chrome extension that does web scraping in the browser instance. I have been looking into the chrome.devtools api to see if I can inspect element in certain sites the block requests like Twitter or Quora. However, I am not sure if there is a programmatic way to set the context for the inspectWindow api, so I can inspect on a specific tab.

Here is what I have:
devtools.js

background.js

background

I am not sure about the devtools context, It seems like it is only active when I do inspect manually. Is there a way to set it to active after opening a new tab?

0

There are 0 answers