3

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.)

Kalle
  • 13,186
  • 7
  • 61
  • 76

1 Answers1

4

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).

Boris Zbarsky
  • 34,758
  • 5
  • 52
  • 55
  • You probably have a JS XPCOM component, so look at the "JavaScript components" section of the page Boris linked you to. Update the manifest and change the module registration code. – Mark Finkle Apr 27 '11 at 23:16
  • Looking into this as we speak. Running out of time but will look more later today. Thanks for spotting that! – Kalle Apr 28 '11 at 07:44
  • This was the case. Thanks again. Now on to the other issues that have appeared... :) – Kalle Apr 28 '11 at 17:58