amIWebInstaller

This interface is used to allow webpages to start installing add-ons.

Methods

isInstallEnabled(aMimetype, aReferer)

Checks if installation is enabled for a webpage.

Parameters

aMimetype The mimetype for the add-on to be installed
referer The URL of the webpage trying to install an add-on

Returns

true if installation is enabled

installAddonsFromWebpage(aMimetype, aOriginator, aReferer, aUris, aHashes, aNames, aIcons, aCallback, aInstallCount)

Installs an array of add-ons at the request of a webpage

Parameters

aMimetype The mimetype for the add-ons
aOriginator If not e10s, the window installing the add-ons, otherwise the browser installing the add-ons.
aReferer The URI for the webpage installing the add-ons
aUris The URIs of add-ons to be installed
aHashes The hashes for the add-ons to be installed
aNames The names for the add-ons to be installed
aIcons The icons for the add-ons to be installed
aCallback An optional callback to notify about installation success and failure
aInstallCount An optional argument including the number of add-ons to install

Returns

true if the installation was successfully started