开发者

Firefox Extension Development: How to correctly specify the anchor element for a notification popup?

开发者 https://www.devze.com 2023-03-03 13:46 出处:网络
being new to JavaScript and Firefox extension development, I\'m trying to set the anchor element for a popup notification, but it doesn\'t seem to work, it\'s being either ignored, or the notif开发者_

being new to JavaScript and Firefox extension development, I'm trying to set the anchor element for a popup notification, but it doesn't seem to work, it's being either ignored, or the notif开发者_C百科ication doesn't show up at all.

Neither just giving the label as a plain string nor something like document.getElementById("xyz") or alike worked, and since I'm new to the whole matter I don't even know what exactly to look for on google, at least I couldn't find anything helpful.

Anybody can help a newbie? Thanks in advance!


The anchorID is (correctly) described in the linked document as a string giving the id of an element in the document that should serve as the anchor of the notification.

Note that the element should be an image child of the notification-popup-box element, and CSS will be needed to ensure that the icon is visible when the notification is created.

#notification-popup-box[anchorid="my-notification-icon"] > #my-notification-icon {
  display: -moz-box;
}
0

精彩评论

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