0
我一直在嘗試在我的firefox擴展中爲門架通知添加一個圖標。然而,我卻無法做到這一點。以下是我試過的...添加圖標到門衣架FireFox Extension的通知
PopupNotifications.show(gBrowser.selectedBrowser, "sample-popup",
message,
anchor, /* anchor ID */
{
label: primaryLabel,
accessKey: accessKey,
callback: function() {
alert("Doing something awesome!");
}
},
null, /* secondary action */
{
popupIconURL: WWWUP_ResourceURLs.icon
}
);
使用popupIconURL選項。上述不起作用,它也不會產生錯誤。
我一直在尋找在文檔https://developer.mozilla.org/en/Using_popup_notifications#Adding_an_icon_to_your_notification
提到的方法我不明白的地方追加下面的代碼...
.popup-notification-icon[popupid="sample-popup"] {
list-style-image: url("chrome://popupnotifications/skin/mozlogo.png");
}
一些指導,將不勝感激。
謝謝!這非常有幫助! – 2012-02-21 15:56:23