如何将 XUL 面板 (Firefox) 放置在主窗口的右下角?
我正在创建一个 Firefox 扩展,它会弹出类似咆哮的通知。目前我正在相对于状态栏图标弹出它们。这很好,除非安装了其他状态栏扩展,这会使我的图标不是最右边的元素。我该如何定位它,以便通知始终从右下角开始?
当前代码:
container.openPopup(document.getElementById('notification-statusbar'), 'before_end', 0, -5, false, false);
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:
container.openPopup(document.getElementById('notification-statusbar'), 'before_end', 0, -5, false, false);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为默认状态栏 ID 是“status-bar”是正确的(这当然是有道理的!)。如果是这种情况,那么您应该能够始终将其附加到
document.getElementById("status-bar")
的“before_end”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")