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 (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.

SearchCallbacks are notified when the AddonRepository search completes. If the search succeeded, then searchSucceeded() is called and is passed an array of Addon objects that matched the search. Since these Addons are not actually installed, the AddonManager does not know about them. However, for each returned add-on, an AddonInstall object is created, which the AddonManager does know about. Each AddonInstall can be accessed through the Addon install attribute, and is initially in the STATE_AVAILABLE state. The array of Addons passed to  searchSucceeded() only includes add-ons that are compatible with the current application and are not already installed or being installed. The AddonRepository is available for another search once one of the callback functions is called.

Method Overview

void searchSucceeded(in Addon addons[], in integer addonCount, in integer totalResults)
void searchFailed()



Called when a successful search completes.

void searchAddons(
  in Addon addons[],
  in integer addonCount,
  in integer totalResults
Array of Addon objects representing the add-ons found by the search. The array represents a subset of the total add-ons available in the repository that match the search.
The number of add-ons returned. Note, addons.length == addonCount.
The total number of results available in the repository.


Called when a search results in failure. A new search will immediately fail if AddonRepository is completing another search request.

void searchFailed();


See also

Document Tags and Contributors

Contributors to this page: wbamberg, david_ross, Sheppy, bparr
Last updated by: wbamberg,