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. By simply downloading the Google Chrome browser and installing the extension Web Scraper, It is used where you do not have to write codes or download software to scrape data, a Chrome extension will be enough for most scenarios. There are many examples in the Message Passing page for you to check out. Web Scraper is the most popular web scraping browser extension. 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. You can open the background page's console if you click on the "background.html" link in the extensions list.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |