Migrating raw components to add-ons
Historically, Firefox has allowed third party contributions to be added to the application's
components/ directory, but beginning with Firefox 3.6, this is no longer permitted. Components added in this way are invisible to users and cannot be managed through the Firefox add-ons manager. What's worse, though, is that these components don't have a mechanism for specifying the versions of Firefox with which they are compatible, leading to poor integration and instability as users upgrade their Firefox installations.
The Firefox extension mechanism allows you to do everything that you could do through direct component drops, but also gives you and your users extra flexibility and more sophisticated versioning support. As we roll this new behavior out, this document will be updated with additional information addressing scenarios we see developers encountering.
If your goal is just to get your raw component working properly as an extension, you can do this in three steps:
- Create a new add-on using the instructions here. As you'll see, add-ons give you much more flexibility than simply loading a component, but in order to get started, all you'll need is your directory structure and install manifest.
- Create a
components/directory in the root of your add-on's directory.
- Add your JS and binary components within that directory. They will be registered the first time Firefox is run once your add-on is installed.
Once you have an add-on packaged, users can install it by visiting your site and giving the add-on permission to install. Many software authors install Firefox components as a by product of their own software installs, though. If you would like to install Firefox add-ons in an automated, programmatic way, we have documented a set of best practices.