How to programmatically open a chrome extension popup window from background.html

前端 未结 4 1584
忘了有多久
忘了有多久 2020-12-13 01:07

Thanks in advance!

What I want to achieve is to open the popup window when a special tag is detected on a webpage by my extension. After searching for a while it see

4条回答
  •  粉色の甜心
    2020-12-13 01:20

    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.

提交回复
热议问题