简体   繁体   English

如何在主窗口的右下角放置XUL面板(Firefox)?

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

I am creating a Firefox extension that pops up growl-like notifications. 我正在创建一个Firefox扩展,它弹出类似咆哮的通知。 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: 当前代码:

container.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!). 我说对了,默认的statusbar ID是“ status-bar”(这肯定是有道理的!)。 If this is the case then you should be able to always append it to the "before_end" of 如果是这种情况,那么您应该始终可以将其附加到以下内容的“ before_end”

document.getElementById("status-bar")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM