navigator.mozApps.getInstalled Redirect 3

« DOM Reference

Non-standard
This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

Summary

Get a list of all installed apps from this origin. For example, if you call this on the Firefox Marketplace, you will get the list of apps installed by the Firefox Marketplace.

Note: Multiple apps per origin are not supported. To host several apps from one domain, set up a subdomain for each app; for example: myapp.mydomain.com, otherapp.mydomain.com, and so forth.

Syntax

var request = window.navigator.mozApps.getInstalled();

Parameters

None.

Example

var request = window.navigator.mozApps.getInstalled();
request.onerror = function(e) {
  alert("Error calling getInstalled: " + request.error.name);
};
request.onsuccess = function(e) {
  alert("Success, number of apps: " + request.result.length);
  var appsRecord = request.result;
};

Callers are expected to set the onsuccess and onerror callback properties of the returned object, as shown in this example. If the call is successful an array of App objects is returned in the result property of the returned object. In the example this is request.result.

Errors

The string ERROR can be returned in DOMRequest.error.

Document Tags and Contributors

 Contributors to this page: chrisdavidmills
 Last updated by: chrisdavidmills,