(Chrome Extension)How to pragmatically open the popup window from background.html?

If by popup you mean browser action popup then you are right, there is no way of opening it programmatically You can embed whatever you need from your popup on demand directly into a page through a content script I think this would be the best solution If your popup doesn't contain anything fancy, maybe desktop notifications would be enough for you Creating a new window and positioning it under the url bar would be pretty awkward solution and not very user friendly.

If by popup you mean browser action popup then you are right, there is no way of opening it programmatically. You can embed whatever you need from your popup on demand directly into a page through a content script. I think this would be the best solution.

If your popup doesn't contain anything fancy, maybe desktop notifications would be enough for you. Creating a new window and positioning it under the url bar would be pretty awkward solution and not very user friendly.

It is impossible to get the extension window to open without a user clicking on it... However, you can get the extension popup page to open in a new tab as follows: 1) Set your background page in your manifest file...** "background_page": "background. Html", This is where you will run the code to see whether the special tag is detected... background pages can constantly run code in the background, and it is up to you to set a repeat loop to check whether you variable condition is true every so often... 2) Enable tabs permission in your manifest file...** "permissions": "tabs" , This permission is needed for step 3 (Allows the background page to open a new tab) 3) In background page, call create and point to the extension popup url. ** if(condition = true){ chrome.tabs.

Create({url:"popup. Html"}); }.

Related Questions