Event onBrowserClose for Google Chrome Extension?

后端 未结 5 1951
梦毁少年i
梦毁少年i 2020-11-27 19:08

I am developing an extension for Google Chrome. My background script, everytime, authorizes on a server that uses the XMPP API, and subscribes for a PubSub node. I need to u

5条回答
  •  -上瘾入骨i
    2020-11-27 19:30

    This one works for me:

    chrome.windows.onRemoved.addListener(function(windowId){
      alert("!! Exiting the Browser !!");
    });
    

    It takes chrome.windows rather than chrome.tabs.

提交回复
热议问题