0
Firefox擁有一個原生通知框系統: https://developer.mozilla.org/en/Code_snippets/Alerts_and_Notifications#Using_notification_boxFirefox擴展,使通知框出現在所有選項卡
我想,當它是應該的,因爲它出現在所有打開的標籤的方式來使用這個系統出現。我只在當前打開的標籤中警告你。
var mainWindow = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsIWebNavigation).QueryInterface(Components.interfaces.nsIDocShellTreeItem).rootTreeItem.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsIDOMWindow);
var nb = mainWindow.gBrowser.getNotificationBox();
//...
outdatedNotification = nb.appendNotification("Your information outdated",
'outdate-warn',
'chrome://checksistem/skin/checksistem.png',
priority, buttons);