Chrome extension: programmatic way to open popup.html from background.html?

I would like to open my popup.html in my background.html page. I would also like to pass data using the same method. Is it possible? Has anyone cracked a way to do this?

+3
source share
1 answer

You cannot do this. The popup should be activated by the user if you want it to be displayed.

If you want to use the method from the help page in a popup window, you can access the background page by doing the following in the popup window:

var bkg = chrome.extension.getBackgroundPage();
bkg.callFunction();
+6
source

Source: https://habr.com/ru/post/1796478/


All Articles