• Skip to main content
  • Select language
  • Skip to search
MDN Web Docs
  • Technologies
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs / DOM
    • WebExtensions
    • MathML
  • References & Guides
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
Firefox
  1. MDN
  2. Mozilla
  3. Firefox
  4. Firefox developer release notes
  5. Firefox 7 for developers
  6. Updating extensions for Firefox 7

Updating extensions for Firefox 7

In This Article
  1. XPCOM changes affecting compatibility
    1. Removed interfaces
    2. Changed methods
  2. Other changes of note
    1. Unloading JavaScript code modules
    2. Inline preferences
  3. See also

This article offers advice for add-on developers that want to update their extensions to work in Firefox 7. Fortunately, most of the changes are relatively minor in this release, and few add-ons should need significant changes to work in Firefox 7.

Note: For a complete list of developer-related changes in Firefox 7, see Firefox 7 for developers.

As always, you will need to recompile any binary components to make them compatible with Firefox 7.

XPCOM changes affecting compatibility

Most of the changes in this release are XPCOM interface removals, or removals of specific, obsolete APIs from interfaces.

Removed interfaces

The following interfaces are the ones that were removed that will most likely impact extension developers:

  • nsIDOM3Node
  • nsIDOM3TypeInfo
  • schemaTypeInfo
  • nsIDOMNSDocument
  • nsIDOMDocumentStyle

You can get a complete list of the removed interfaces in the Removed interfaces section of Firefox 7 for developers.

Changed methods

A few interfaces have methods that have been changed:

nsINavHistoryObserver and nsINavBookmarkObserver
These have been changed to support Firefox Sync better by adding a new GUID parameter to several of their methods. JavaScript-based code shouldn't require any changes, since this is just the addition of a new, optional, parameter. However, binary components will need to be updated to take the new parameter into account.
nsIDOMFile
A number of non-standard methods have been removed from this interface. This affects the File object's File.getDataAsUrl() and File.getAsBinary() methods. However, this functionality can now be found in the standard FileReader object.

Other changes of note

These changes won't affect compatibility (we weren't kidding when we said there weren't many changes that do in this release), but do add capabilities that are easy to take advantage of that might be of special use to you.

Unloading JavaScript code modules

The new Components.utils.unload() method lets you unload JavaScript code modules previously loaded by calling Components.utils.load(). This can be particularly handy with restartless (boostrapped) extensions, so that you can unload an old version of a code module when a new version of your add-on is installed.

Inline preferences

You can now have preference options inline in the Add-on Manager window, which lets users configure your add-on without having to open a separate preference dialog box. There are limits to what types of configuration controls can be provided, but this is still very helpful -- plus it works for restartless (boostrapped) extensions.

See also

  • Firefox 7 for developers
  • Add-ons Blog: Firefox 7 add-on compatibility
  • XPCOM changes in Gecko 2.0

Document Tags and Contributors

Tags: 
  • Extensions
  • Firefox
  • Firefox 7
 Contributors to this page: teoli, Sheppy, Pinkmm
 Last updated by: teoli, May 27, 2014, 3:33:27 AM
  1. Add-ons
    1. Firefox developer release notes
    2. Add-ons
    3. Add-on guidelines
    4. Add-on Manager
    5. Extensions
    6. OpenSearch plug-ins
    7. Plugins
    8. Themes
  2. Firefox internals
    1. Firefox developer release notes
    2. Mozilla project
    3. Gecko
    4. JavaScript code modules
    5. JS-ctypes
    6. MathML project
    7. MFBT
    8. Mozilla projects
    9. Preference system
    10. WebIDL bindings
    11. XPCOM
    12. XUL
  3. Building and contributing
    1. Build instructions
    2. Configuring build options
    3. How the build system works
    4. Mozilla source code
    5. Localization
    6. Mercurial
    7. Quality assurance
    8. Using Mozilla code in other projects