从 Xul 应用程序打开扩展管理器时出错

发布于 2024-09-28 14:36:19 字数 570 浏览 5 评论 0原文

当我使用以下命令在 Xul 应用程序中打开扩展管理器时:

app = "chrome://mozapps/content/extensions/extensions.xul";
window.open(app,'Test','chrome, width=640, height=480').moveTo(0,0);

我在 javascript 控制台中收到以下错误:

错误:未捕获的异常: [异常...“组件返回 故障代码:0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch2.getBoolPref]" ns结果:“0x8000ffff (NS_ERROR_UNEXPECTED)”位置:“JS 框架 :: chrome://mozapps/content/extensions/extensions.js :: updateGlobalCommands :: 第 2388 行” 数据:无]

知道这是什么吗?

附:扩展管理器打开并运行良好,但我担心此错误消息。

When I open the extensions manager in my Xul app using:

app = "chrome://mozapps/content/extensions/extensions.xul";
window.open(app,'Test','chrome, width=640, height=480').moveTo(0,0);

I get the following error in the javascript console:

Error: uncaught exception:
[Exception... "Component returned
failure code: 0x8000ffff
(NS_ERROR_UNEXPECTED)
[nsIPrefBranch2.getBoolPref]"
nsresult: "0x8000ffff
(NS_ERROR_UNEXPECTED)" location: "JS
frame ::
chrome://mozapps/content/extensions/extensions.js
:: updateGlobalCommands :: line 2388"
data: no]

Any idea what's this?

ps. The extensions manager opens and works well, but I'm worried with this error message.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

唠甜嗑 2024-10-05 14:36:19

Extensions.js 的第 2387-2388 行是:

if (!gInstalling &&
    (gPendingActions || gPref.getBoolPref(PREF_EXTENSIONS_DSS_SWITCHPENDING)))

所以我猜您的应用程序没有设置 extensions.dss.switchPending 首选项。由于某种原因,这并不存在于 all.js 中,因此您必须在应用程序的默认首选项中将其设置为 false。

Lines 2387-2388 of extensions.js are:

if (!gInstalling &&
    (gPendingActions || gPref.getBoolPref(PREF_EXTENSIONS_DSS_SWITCHPENDING)))

So I guess that your application doesn't have the extensions.dss.switchPending preference set. For some reason this doesn't live in all.js so you have to set it to false in your application's default preferences.

箹锭⒈辈孓 2024-10-05 14:36:19

您需要在 XULRunner 应用程序中执行一些操作才能加载扩展管理器。该组件依赖于 Branding,它包含在 Firefox 中,但不包含在 XULRunner 中。

阅读这些 XULRunner 提示,其中涵盖了启用扩展程序所需执行的操作XULRunner 应用程序中的管理器。

请特别注意 chrome.manifest 中所需的更改,以及添加 3 个 Firefox PNG 文件。

此外,如果您尚未设置该文档顶部引用的首选项,则也需要执行此操作。事实上,我建议您从该文档的顶部开始,然后向下查看列表,验证您是否已准备好所有必要的组件。

There are some things that you need to do in your XULRunner application in order to be able to load the Extensions Manager. This component has a dependency on Branding, which is included in Firefox, but not XULRunner.

Read these XULRunner Tips that cover the things that you need to do in order to enable the Extension Manager in your XULRunner application.

Pay special attention to the changes required in your chrome.manifest, as well as the addition of 3 Firefox PNG files.

In addition, if you haven't set the preferences referenced at the top of that document, you will need to do that as well. In fact, I suggest you start at the top of that document and go down the list, verifying that you have all the necessary components in place.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文