![]() When you click the popup, it's loaded into the current page, thus the console.log should show log message in the current page. To view it, you may go to chrome://extensions/ and click on that inspect view under your extension. To answer your question directly, when you call console.log("something") from the background, this message is logged, to the background page's console. There are many examples in the Message Passing page for you to check out. The reason, they both belong to different domains, which make sense. Now if you want to do the same within content scripts you have to use Message Passing to achieve that. ![]() That means, within the popup page, you can just do: ().console.log('foo') This opens a new window.įor the context menu sample the window has the title: _generated_background_page.html.Īny extension page (except content scripts) has direct access to the background page via (). Under your extension click on the link background page. You will see something like this screenshot. To access the background page that corresponds to your extensions open Settings / Extensions or open a new tab and enter chrome://extensions. Chrome extensions are a great tool if you want to scrape small portions of data. ![]() Web scraping can be performed by chrome extensions, cloud-based software & installable software. ![]() You can open the background page's console if you click on the "background.html" link in the extensions list. Generally, web scraping is used for scraping product pricing & reviews, monitoring news articles, capturing leads, etc.
0 Comments
Leave a Reply. |