开发者_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()
.
精彩评论