0

我收到一些错误报告,说我的 Firefox 扩展程序不再在 Firefox 25 中运行。我无法重现该错误,但有人向我发送了他们看到的错误:

TypeError: this.rehostImageBundle.getString 不是函数@ chrome://rehostimage/content/rehostimage.js:196

rehostimage.js:

this.rehostImageBundle = document.getElementById("us.engy.rehostImage.bundle");
...
var stringValue = this.rehostImageBundle.getString("message.uploadprogress");

它们在相同的功能、相同的范围内运行。最后一行是第 196 行。

rehostimage.xul:

<!DOCTYPE window SYSTEM "chrome://rehostimage/locale/rehostimage.ent">
<overlay id="rehostimage" 
     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  <script type="application/x-javascript" src="chrome://rehostimage/content/rehostimage.js"/>
  ...

  <popup id="contentAreaContextMenu">
    <stringbundleset id="us.engy.rehostImage.stringbundles">
      <stringbundle id="us.engy.rehostImage.bundle" src="chrome://rehostimage/locale/rehostimage.properties"/>
    </stringbundleset>
    ...
  </popup>
  ...
</overlay>

因此,当它调用 getElementById 时似乎没有提出stringbundle,但我不知道它为什么会这样做,或者为什么它只会在某些设置下发生。

我检查了 Firefox 25 的附加组件兼容性,但没有看到任何关于字符串包的信息。

有人遇到这个或有任何想法吗?

4

1 回答 1

0

原来是与菜单编辑器的扩展冲突。关于 Firefox 25 的某些内容改变了它与上下文菜单的交互方式,它删除了我在上下文菜单叠加层中包含的资源包。我将捆绑包移动到插件栏覆盖层并解决了冲突。

于 2013-11-02T01:27:17.047 回答