Add-on SDK update for Firefox 22 (and 23, and 24)

Firefox 22 shipped today, Firefox 23 entered Beta, and Firefox 24 entered Aurora.

This is the first time the SDK modules in a release of Firefox have diverged from the modules shipping in the last independent release of the SDK, which was 1.14. So we’ve updated the docs for this release, and also added docs for Firefoxes 23 and 24:

Once we landed the SDK in Firefox we started work on some larger projects to deliver features we’ve wanted for some time. So Firefox 22 didn’t include many user-visible changes to the SDK.

However, there’s some more interesting stuff coming in Firefox 23 and 24.

Firefox 23

  • panel positioning: now you can supply a position object to the Panel constructor or its show() method, to control where the panel is displayed in the browser window.
  • load and pageshow tab events. The load event means you can get page load notifications for pages, like images, that don’t contain DOM content. The pageshow event means you can get notified when a page is retrieved from the BFCache: for example, when the user uses the “Back” button to navigate back to a page.
  • XUL window support: you can include a chrome.manifest file and use it to specify XUL windows for your add-on. This makes it easier to port a XUL add-on to the SDK, because you don’t immediately have to rewrite XUL windows in HTML.

Firefox 24

  • support for HEAD requests: thanks to @bkase for fixing this very old bug.
  • deprecate addon-page: the addon-page module isn’t compatible with the new “Australis” UI coming in Firefox, so we’ve deprecated it in Firefox 24. It will still work until Australis ships, then using the module will have no effect (addon-page tabs will look like normal content tabs).
  • cross-domain content scripts: a new field in “package.json” enables content scripts to access content in iframes served from a different domain, and to make cross-domain XMLHttpRequests.

12 comments on “Add-on SDK update for Firefox 22 (and 23, and 24)”

  1. ac wrote on

    Are you gonna release new version of SDK or there will be no more stand alone SDK release?

    1. wbamberg wrote on

      Yes, there will be another standalone release (see

      I think it makes sense to think of “the SDK” as being in two pieces now: the JavaScript modules implementing the APIs, and the Python code that implements cfx.

      So any new standalone release will be effectively only a release of cfx: although it might include the JavaScript modules, that’s not particularly relevant, since any add-ons you build with it will by default* use the versions of the modules in Firefox.

      Eventually, cfx will probably be rewritten in JavaScript (this has been proposed as a Q3 goal: and then distributed as a Firefox add-on itself.

      *You can instruct cfx to use the local versions of the modules using the “-o” option. But this is more likely to make sense if you’re using a clone of the SDK repo, and want a very specific version of the modules.

  2. Pikadude No. 1 wrote on

    I’d like to see docs for using the APIs from an XPI extension.

    1. wbamberg wrote on

      Do you mean XUL extension? I haven’t ever tried this, but I think the way to do it would be to import the loader module:

      let { Loader, Require, unload } = Components.utils.import(‘resource://gre/modules/toolkit/loader.js’);

      …then you instantiate and configure your own loader, as documented here:

      …then use the loader to load SDK modules.

      But this would be a great topic for a blog post/tutorial, so thanks for mentioning it.

  3. Jim wrote on

    is there a possibility to add Social API to the add-on SDK?

    1. wbamberg wrote on

      I think it’s unlikely that the SDK will add support for Social API any time soon, but it might be possible to develop a third-party module that would expose it to SDK-based add-ons.

  4. Alexufo wrote on

    that’s the question!

  5. Girish wrote on

    I just upgraded to Firefox 23. The Panel isn’t being displayed and it throws the following error.

    Error: RequirementError: The option “width” must be one of the following types: number, undefined, null

    I’m using addon sdk 1.14 to build the extension.

    1. wbamberg wrote on

      Can you share a link to your extension?

  6. Cookie wrote on

    Everytime I do an update I loose my add on’s. I’m really getting sick of it. Mozilla should figure a way to let the ad on’s work in all versions!!!!!!!!!

  7. sbaglieri wrote on

    “cross-domain content scripts” is only for firefox 24?

    1. wbamberg wrote on