Can you focus a popup window from a Chrome Extension

前端 未结 1 1096
野性不改
野性不改 2021-02-13 14:13

I have a Chrome Extension that does a window.open() when the extensions icon is clicked. (It can\'t use the traditional Chrome extension popup due to an unrelated bug in Chrome)

相关标签:
1条回答
  • 2021-02-13 14:29

    Instead of using window.open() use the Chromes chrome.windows.create... http://code.google.com/chrome/extensions/windows.html#method-create
    ...then in the call back you can record its window.id and then any time you want to make it focused you can use chrome.windows.update.

    0 讨论(0)
提交回复
热议问题