避免在 Firefox 扩展中自动隐藏面板 [英] Avoid panel to autoHide in Firefox extension

查看:33
本文介绍了避免在 Firefox 扩展中自动隐藏面板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我实际上是在尝试使用高级 API 开发 Firefox 扩展,特别是在您选择文件或在面板本身之外单击时,特别是要避免面板自动隐藏.

I am actually trying to develop a Firefox extension using the high level apis, and specifically trying to avoid a panel to autohide when you pick a file or when you click outside of the panel itself.

有人知道如何做到这一点吗?

Does somebody has an idea of how to do this?

我知道可以使用 XUL,那么为什么使用 apis 并不容易?

I know that it is possible using XUL, so why is this not easy using the apis?

预先感谢您的回答.

推荐答案

这是官方的sdk方法:

This is the offical sdk method of doing it:

let myPanel = Panel({.....})

let { getActiveView }=require("sdk/view/core");
getActiveView(myPanel).setAttribute("noautohide", true);

这篇关于避免在 Firefox 扩展中自动隐藏面板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆