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.
The AddonUpdateChecker is used to download and parse update information for an add-on's update manifest. If all you care about is finding the newest version for an Addon
then you probably want to use findUpdates()
instead.
To import the AddonUpdateChecker, use:
Components.utils.import("resource://gre/modules/AddonUpdateChecker.jsm");
UpdateInfo getCompatibilityUpdate(in UpdateInfo updates[], in string version, in boolean ignoreCompatibility, in string appVersion, in string platformVersion) |
UpdateInfo getNewestCompatibleUpdate(in UpdateInfo updates[], in string appVersion, in string platformVersion) |
void checkForUpdates(in string id, in string type, in string updateKey, string URL, in UpdateCheckListener listener) |
Constant | Description |
ERROR_TIMEOUT |
The update check timed out. |
ERROR_DOWNLOAD_ERROR |
There was an error while downloading the update information. |
ERROR_PARSE_ERROR |
The update information was malformed in some way. |
ERROR_UNKNOWN_FORMAT |
The update information was not in any known format. |
ERROR_SECURITY_ERROR |
The update information was not signed by the update key used for retrieval. |
Retrieves the best matching compatibility update for the application from a list of available update objects.
UpdateInfo
getCompatibilityUpdate( inUpdateInfo
updates[], in string version, in boolean ignoreCompatibility, in string appVersion, in string platformVersion )
Returns the newest available update from a list of update objects.
UpdateInfo
getNewestCompatibleUpdate( inUpdateInfo updates[], in string appVersion, in string platformVersion )
Parameters
updates
An array of update objects
appVersion
The version of the application or null to use the current version
platformVersion
The version of the platform or null to use the current version
checkForUpdates()
Starts an update check.
void checkForUpdates(
in string id,
in string type,
in string updateKey,
string URL,
in UpdateCheckListener
listener
)
Parameters
id
The ID of the add-on being checked for updates
type
The type of add-on being checked for updates
updateKey
An optional update key for the add-on
URL
The URL of the add-on's update manifest
listener
An observer to notify of results