javascript - 修复 "gBrowser.addProgressListener was called with a second argument, which is not supported"警告

标签 javascript firefox firefox-addon

我将我的插件提交到 firefox amo 目录,它得到了审查并通过了,但是审查者给我发了这条消息:

2) The following error appears in the Error Console. It's fairly easy to fix.

Error: gBrowser.addProgressListener was called with a second argument, which is not supported. See bug 608628. Source File: chrome://browser/content/tabbrowser.xml Line: 1840

问题是我从未接触过 chrome://browser/content/tabbrowser.xml 甚至不知道在哪里可以找到它...所以我该如何解决这个问题?

谢谢!

最佳答案

听起来您正在使用多个参数在代码中的某处调用 addProgressListener()。它是一个单参数函数 - 您可以在此处找到文档:

https://developer.mozilla.org/en/XUL/tabbrowser#m-addProgressListener

位置 chrome://browser/content/tabbrowser.xml 是函数定义的地方,第 1840 行是文件中“不要使用更多调用此函数”的位置多于一个参数”错误被抛出。您可以在(我认为)browser/base/content/tabbrowser.xml 的 FF 源文件中找到该文件,但在这种情况下您可能不需要检查它。

关于javascript - 修复 "gBrowser.addProgressListener was called with a second argument, which is not supported"警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6500786/

相关文章:

javascript - 在 Ramda 中有条件地 promise

windows - 您可以通过 PKCS#11 向 Mozilla Firefox 公开 Windows 证书存储吗?

javascript - 加载内容脚本中使用的库

Javascript获取所有状态下元素的样式

从java中生成html报告时的javascript问题

javascript - 使用 jQuery 和 Ajax 更改操作提交表单

html - Mozilla Firefox 表单值在 history.back 上重置

asp.net - 为什么 FireFox 3.6.8 不缓存来自 asp.net 开发者服务器的静态内容?

javascript - 如何用自己网站的数据填写另一个网站的表格

javascript - 页面中键点击监听器