更新 XPI 以兼容 FF 4.0?
当用户群开始迁移到 Firefox 4 时,我编写的一个扩展停止工作,现在我正在尝试找到更新它以使其兼容的方法。
我已经阅读了有关“更新 Firefox 4.0 的应用程序”的各种博客文章/页面,例如 - https://developer.mozilla.org/en/Extensions/Updating_extensions_for_Firefox_4 - http://blog.mozilla .com/addons/2010/11/11/making-add-on-兼容-firefox-4/
但它们似乎都没有触及我遇到的特定问题,即:
应用程序有一个协议 即用户可以在 URL 栏中输入 "foo://blabla"
,我的应用程序将接受所有 "foo://"
请求。 Firefox 现在显示“Firefox 不知道如何打开此地址,因为协议 (foo) 未与任何程序关联。”
有人知道如何修复吗? (修复已接受的答案。)
下一个问题是服务器和客户端之间的大量交互。通过将“dotwrappedJSObject”添加到适当的位置来解决这个问题,在这些位置需要揭示服务器端在 JavaScript 中做了什么,例如创建函数或诸如此类的东西。例如,以前,cframe.document.foo
可以工作,但现在返回未定义;通过执行cframe.document.wrappedJSObject.foo
解决。 (在这里添加这个以防万一。)
An extension that I wrote stopped working as the user base started migrating to Firefox 4 and now I'm trying to find ways to update it to be compatible.
I've read thru the various blog posts / pages on "updating your app for Firefox 4.0" e.g.
- https://developer.mozilla.org/en/Extensions/Updating_extensions_for_Firefox_4
- http://blog.mozilla.com/addons/2010/11/11/making-add-on-compatible-firefox-4/
but none of them seem to touch on the particular problem I have, namely:
App has a protocol i.e. users can type "foo://blabla"
in the URL bar and my app would take all "foo://"
requests. Firefox now says "Firefox doesn't know how to open this address, because the protocol (foo) isn't associated with any program."
Anyone know how to fix? (Fix is in accepted answer.)
Next problem was a bunch of interaction between the server and client. This was solved by adding "dot wrappedJSObject" to the appropriate spots, where it was necessary to reveal what the server-side had done in javascript, such as making functions or whatnot. E.g. formerly, cframe.document.foo
worked, but now returns undefined; solved by doing cframe.document.wrappedJSObject.foo
. (Adding this here just in case.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有可能,您需要按照 https://developer.mozilla.org/ 修复组件注册en/XPCOM/XPCOM_changes_in_Gecko_2.0(从您引用的页面链接)。
Chances are, you need to fix your component registration per https://developer.mozilla.org/en/XPCOM/XPCOM_changes_in_Gecko_2.0 (linked from the page you cited).