Marketplace feature removal
The functionality described on this page no longer works — Firefox Marketplace has discontinued support for Android, Desktop, Tablets, and payments (and other related functionality). For more information, read the Future of Marketplace FAQ.
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: Installable open web apps used to have a "single app per origin" security policy, but this was lifted as of Firefox 34/Firefox OS 2.1 (read this FAQ entry for more information). If you still need to support older versions, consider hosting your apps at separate origins; one strategy is to create different subdomains for your apps.
Syntax
var request = window.navigator.mozApps.getInstalled
()
;
Errors
The string ERROR
can be returned in DOMRequest.error
.
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
.