开发者

How do I position a XUL Panel (Firefox) in the bottom right hand corner of the main window?

开发者 https://www.devze.com 2022-12-19 15:49 出处:网络
I am creating a Firefox extension that pops up growl-like notifications. Currently I am popping them up relative to a status bar icon. This is fine unless there are other status bar extensions install

I am creating a Firefox extension that pops up growl-like notifications. Currently I am popping them up relative to a status bar icon. This is fine unless there are other status bar extensions installed that would make my icon not the rightmost element. How would I go about positioning it so that the notifications always start at the bottom right?

Current Code:

cont开发者_如何学Goainer.openPopup(document.getElementById('notification-statusbar'), 'before_end', 0, -5, false, false);


I think I'm right in saying that the default statusbar id is "status-bar" (it'd certainly make sense!). If this is the case then you should be able to always append it to the "before_end" of

document.getElementById("status-bar")

0

精彩评论

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