Support for extensions using XUL/XPCOM or the Add-on SDK was removed in Firefox 57, released November 2017. As there is no supported version of Firefox enabling these technologies, this page will be removed by December 2020.
Add-ons using the techniques described in this document are considered a legacy technology in Firefox. Don't use these techniques to develop new add-ons. Use WebExtensions instead. If you maintain an add-on which uses the techniques described here, consider migrating it to use WebExtensions.
Starting from Firefox 53, no new legacy add-ons will be accepted on addons.mozilla.org (AMO) for desktop Firefox and Firefox for Android.
Starting from Firefox 57, only extensions developed using WebExtensions APIs will be supported on Desktop Firefox and Firefox for Android.
Even before Firefox 57, changes coming up in the Firefox platform will break many legacy extensions. These changes include multiprocess Firefox (e10s), sandboxing, and multiple content processes. Legacy extensions that are affected by these changes should migrate to use WebExtensions APIs if they can. See the "Compatibility Milestones" document for more information.
A wiki page containing resources, migration paths, office hours, and more, is available to help developers transition to the new technologies.
InstallListeners are notified of an AddonInstall
's progress. They may be registered to hear events from all AddonInstall
s through addInstallListener
or to a single AddonInstall
through addListener
.
void onNewInstall(in AddonInstall install) |
void onDownloadStarted(in AddonInstall install) |
void onDownloadProgress(in AddonInstall install) |
void onDownloadEnded(in AddonInstall install) |
void onDownloadCancelled(in AddonInstall install) |
void onDownloadFailed(in AddonInstall install) |
void onInstallStarted(in AddonInstall install) |
void onInstallEnded(in AddonInstall install, in Addon addon) |
void onInstallCancelled(in AddonInstall install) |
void onInstallFailed(in AddonInstall install) |
void onExternalInstall(in Addon install, in Addon existingAddon, in boolean needsRestart) |
Called when a new instance of AddonInstall
is created, primarily so UI can display some kind of progress for all installs.
void onNewInstall(
in AddonInstall
install
)
AddonInstall
representing the installCalled when downloading begins for an add-on install. Only called for add-ons that need to be downloaded. A listener may return false to cancel the download.
void onDownloadStarted(
in AddonInstall
install
)
AddonInstall
representing the installCalled as data is received during a download. Check the progress
property for the amount of data downloaded and the maxProgress
property for the total data expected. A listener may return false to cancel the download.
void onDownloadProgress(
in AddonInstall
install
)
AddonInstall
representing the installCalled when downloading completes successfully for an add-on install. Only called for add-ons that need to be downloaded.
void onDownloadEnded(
in AddonInstall
install
)
AddonInstall
representing the installCalled when downloading is cancelled. Only called for add-ons that need to be downloaded.
void onDownloadCancelled(
in AddonInstall
install
)
AddonInstall
representing the installCalled if there is some error downloading the add-on. Only called for add-ons that need to be downloaded.
void onDownloadFailed(
in AddonInstall
install
)
AddonInstall
representing the installCalled when installation of an add-on begins. A listener may return false to cancel the install.
void onInstallStarted(
in AddonInstall
install
)
AddonInstall
representing the installCalled when installation of an add-on is complete. The newly installed add-on may require a restart in order to become active.
void onInstallEnded( inAddonInstall
install inAddon
addon )
AddonInstall
representing the installAddon
addon that has been installedCalled when installation is cancelled.
void onInstallCancelled(
in AddonInstall
install
)
AddonInstall
representing the installCalled when there is a failure installing the add-on.
void onInstallFailed(
in AddonInstall
install
)
AddonInstall
representing the installCalled when an add-on is installed through some system other than an AddonInstall
.
void onExternalInstall( inAddon
addon, inAddon
existingAddon, in boolean needsRestart )
Addon
Addon
that will be replaced by this install or null if no add-on is being replaced