Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

amIWebInstaller

This interface is used to allow web pages to start installing add-ons.
1.0
28
Introduced
Gecko 2.0
Inherits from: nsISupports Last changed in Gecko 8.0 (Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5)

Method overview

boolean installAddonsFromWebpage(in AString aMimetype, in nsIDOMWindow aWindow, in nsIURI aReferer, [array, size_is(aInstallCount)] in wstring aUris, [array, size_is(aInstallCount)] in wstring aHashes, [array, size_is(aInstallCount)] in wstring aNames, [array, size_is(aInstallCount)] in wstring aIcons, [optional] in amIInstallCallback aCallback, [optional] in PRUint32 aInstallCount);
boolean isInstallEnabled(in AString aMimetype, in nsIURI aReferer);

Note: Prior to Gecko 8.0, all references to nsIDOMWindow used in this interface were nsIDOMWindow.

Methods

installAddonsFromWebpage()

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

boolean installAddonsFromWebpage(
  in AString aMimetype,
  in nsIDOMWindow aWindow,
  in nsIURI aReferer,
  [array, size_is(aInstallCount)] in wstring aUris,
  [array, size_is(aInstallCount)] in wstring aHashes,
  [array, size_is(aInstallCount)] in wstring aNames,
  [array, size_is(aInstallCount)] in wstring aIcons,
  in amIInstallCallback aCallback, Optional
  in PRUint32 aInstallCount Optional
);
Parameters
aMimetype
The mimetype for the add-ons.
aWindow
The window installing the add-ons.
aReferer
The URI for the web page 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 Optional
An optional callback to notify about installation success and failure.
aInstallCount Optional
An optional argument including the number of add-ons to install.
Return value

true if the installation was successfully started.

isInstallEnabled()

Checks if installation is enabled for a web page.

boolean isInstallEnabled(
  in AString aMimetype,
  in nsIURI aReferer
);
Parameters
aMimetype
The MIME type for the add-on to be installed.
aReferer
The URI of the web page for which to see if installation is allowed.
Return value

true if installation is enabled.

Document Tags and Contributors

 Contributors to this page: Sheppy, kscarfone, trevorh
 Last updated by: Sheppy,