We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

Apps JavaScript API

The Open Web Apps JavaScript API is a programmatic interface for installing Web apps and for managing a client-side collection of Web apps that a user has installed. This collection is called the application repository.

Feature availability

The JavaScript API described here is available in Firefox, Firefox for Android, and Firefox OS.

Methods of the API

All methods related to apps are accessed from the navigator.mozApps object. There are two types of functions available in the API:

  • Installation Functions: related to the installation or management of installed apps. These are interesting to stores, self-distributing apps, and app directories.
  • Management Functions: related to the display, launch, or synchronization of apps. Primarily used by dashboards.

Installation API (navigator.mozApps.*)

The apps installation API is exposed as methods on the window.navigator.mozApps object.

Management API (navigator.mozApps.mgmt.*)

The apps management API is privileged. It is intended to grant access to trusted pages, also called "dashboards". The management API exposes functions that let dashboards manage and launch apps on a user's behalf. Additionally, the API exposes functions for app sync, which lets the dashboard display the logged-in state of the user and allows the user to sign up or register for an account to synchronize apps across devices.


These types of JavaScript objects are used by the apps API:

Old API and the new API

If you were using the older API, it is obsolete as of . The old API is compared with the new API below.

This function has a changed signature.
Replaced by navigator.mozApps.getSelf().
Replaced by navigator.mozApps.getInstalled().
Replaced by navigator.mozApps.mgmt.getAll().
Both of these replaced by navigator.mozApps.oninstall and navigator.mozApps.onuninstall.
navigator.mozApps.mgmt.uninstall(origin, [onsuccess], [onerror])
Replaced by navigator.mozApps.mgmt.uninstall(app) where app is an object returned by getAll() or any other function handing app objects.

Document Tags and Contributors

Last updated by: Sheppy,