我收到了一些错误报告,说我的Firefox扩展在Firefox 25中不再工作。我无法重现错误,但有人把他们看到的错误发给了我:
类型错误:this.hostImageBundle.getString不是函数@chrome://rehostimage/content/rehostimage.js:196
重新主持图像.js:
this.rehostImageBundle = document.getElementById("us.engy.rehostImage.bundle");
...
var stringValue = this.rehostImageBundle.getString("message.uploadprogress");
它们在相同的功能、相同的范围内运行。最后一行是196行。
重新托管.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
,但我不知道为什么它会这样做,或者为什么它只会在某些设置中发生。
我检查过了
Add-on Compatibility for Firefox 25
但没有看到任何关于字符串束的信息。
有人遇到过这个问题或有什么想法吗?