1
是否可以关闭Chrome扩展中的整个应用程序?关闭Chrome扩展程序
是否可以关闭Chrome扩展中的整个应用程序?关闭Chrome扩展程序
你将不得不使用Chrome Windows API关闭所有窗口:
chrome.windows.getAll({}, function(windows){
for(var i = 0; i < windows.length; i++)
chrome.windows.remove(windows[i].id);
});
要只关闭一个标签,使用chrome.tabs.remove()
。
当然,这继续使应用程序运行,只是没有窗口(我不知道是否在某些操作系统,导致应用程序退出,但它肯定不在OS X上...)? – eggyal