开发者

Close Chrome with extension

开发者_StackOverflowIs it possible to close the entire application within a chrome extension?


You would have to use the Chrome Windows API to close all windows:

chrome.windows.getAll({}, function(windows){
  for(var i = 0; i < windows.length; i++)
    chrome.windows.remove(windows[i].id);
});

To just close a tab, use chrome.tabs.remove().

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜