← Chrome 158 reference · All APIs
v158 · capabilities · enabled by default
Web Install API
navigator.install() allows a secure top-level website to prompt the user to install either the current page’s web application (with no arguments) or another same-origin or cross-origin web application identified by its manifest URL and optional manifestId. It provides a promise-based imperative counterpart to the declarative HTML <install> element and replaces the event-driven beforeinstallprompt workflow while keeping browser-controlled consent UI and explicit user activation.
at a glance
| Shipped in | Chrome 158 (desktop), enabled by default — filed under “Enabled by default” in the milestone=158 listing. Android, Android WebView, iOS, and Fuchsia are not enabled (WebAppInstallation in runtime_enabled_features.json5). |
|---|---|
| Origin trial / flag | Developer trial started in Chrome 139 behind chrome://flags/#web-app-installation-api (about_flags.cc, desktop only); Origin Trial ran in Chrome 143–148 (Intent to Experiment). Finch/Blink feature name: WebAppInstallation. |
| Companion feature | Launches in parallel with the declarative HTML <install> element (ChromeStatus 5152834368700416; Chrome 158 Enterprise release notes). |
| Permissions & policies | Permissions API descriptor "web-app-installation"; Permissions Policy web-app-installation (default 'self'); Chrome Enterprise policy WebAppInstallByUserEnabled. |
| Specification | WICG Web Install / <install> Element Draft Specification (Navigator.install()) |
| Explainer | MicrosoftEdge/MSEdgeExplainers — Web Install API explainer |
| Intent | blink-dev Intent to Ship; Intent to Prototype |
| Tracking bug | issues.chromium.org/333795265 |
| Web platform tests | wpt.fyi/results/web-install (API shape, input validation, user activation, and iframe/sandbox restrictions; interactive install prompts require manual confirmation) |
| ChromeStatus | 5183481574850560 — Web Install API |
why it exists
Previously, websites could only trigger web app installation for the currently loaded page by intercepting the non-standard beforeinstallprompt event, and had no web-platform way to offer installation of sibling apps in a multi-app suite or third-party web apps from a catalog or search result without navigating away or relying on platform app stores.
The Web Install API provides a direct, promise-based navigator.install() entry point for both same-document and explicit-manifest (same-origin or cross-origin) installations, while keeping installation gated behind transient user activation, explicit browser-controlled confirmation UI, and a dedicated origin-level web-app-installation permission for background/cross-origin installs.
Syntax
Verbatim WebIDL from the WICG Web Install draft specification and Chromium’s navigator_web_install.idl, install_params.idl, and web_install_result.idl:
partial interface Navigator {
[SecureContext] Promise<WebInstallResult> install();
[SecureContext] Promise<WebInstallResult> install(InstallParams options);
};
dictionary InstallParams {
required USVString manifest;
USVString? manifestId;
};
dictionary WebInstallResult {};
Migration note from the Chrome 143–148 Origin Trial: the earlier positional string overloads (navigator.install(url) and navigator.install(url, manifestId)) were removed before shipping and now reject with TypeError. Always pass either no arguments or an InstallParams dictionary containing a manifest URL (not a document URL).
This reference covers three parts of the contract: navigator.install() overloads and execution order, InstallParams and WebInstallResult, and web-app-installation permission, Permissions Policy, and enterprise control.
navigator_web_install.idl; WPT navigator-install-bad-inputs.tentative.https.html.
navigator.install() — overloads, inputs, and outputs
Inputs (two overloads).
- Zero-argument form —
navigator.install(): targets the web application associated with the currently loaded document’s linked web app manifest. The document’s manifest must declare an explicitidmember; otherwise installation rejects withDataError. - Dictionary form —
navigator.install(options): accepts anInstallParamsdictionary specifying the target app’smanifestURL and optionalmanifestIdURL. Can install either a same-origin sibling app or a cross-origin web app without loading the target app’s HTML document.
Outputs. Returns a Promise<WebInstallResult> that resolves to an empty WebInstallResult object ({}) once the user confirms installation (or, if the app is already installed and the browser shows a launch confirmation dialog, once the user confirms launching it). The resolved object intentionally omits the manifest ID or install metadata to minimize cross-origin state disclosure.
navigator_web_install.cc; Web Install explainer §Proposed Approach.
InstallParams and WebInstallResult dictionaries
InstallParams inputs & URL resolution.
| Member | Type / required | Validation & resolution rules |
|---|---|---|
manifest | USVString (required) | Leading/trailing HTML whitespace is stripped; relative URLs resolve against the current document’s base URL. Missing, empty, whitespace-only, or unparseable URLs reject with TypeError. The fetched manifest’s origin must match its resolved start_url origin; relative URLs inside the manifest resolve against the original manifest URL. |
manifestId | USVString? (optional) | Omit, or pass undefined or null, only if the JSON at manifest explicitly defines an id field. If a non-null string is supplied, leading/trailing HTML whitespace is stripped and relative URLs resolve against the current document’s base URL; an empty, whitespace-only, or unparseable string rejects with TypeError. Must match the browser’s computed manifest ID or the call rejects with DataError. |
WebInstallResult output. Currently an empty dictionary ({}) reserved for future backwards-compatible extensions without exposing sensitive install details today.
install_params.idl; Blink web_install_result.idl; Blink navigator_web_install.cc.
Permissions API, Permissions Policy, and enterprise controls
Inputs & outputs. Three distinct control planes govern navigator.install():
| Control | Identifier | Behavior |
|---|---|---|
| Permissions API | { name: "web-app-installation" } | Queryable via navigator.permissions.query() (permission_descriptor.idl). Required on the requesting origin whenever installing a background or cross-origin app via InstallParams (not prompted for 0-arg current-document installs). If state is "denied", background/cross-origin installs reject with AbortError. |
| Permissions Policy | web-app-installation | Default allowlist is 'self' (permissions_policy_features.json5). Sending Permissions-Policy: web-app-installation=() disables navigator.install() and causes calls to reject with SecurityError. |
| Chrome Enterprise policy | WebAppInstallByUserEnabled | Disables user-initiated web app installation globally, including both navigator.install() and the declarative <install> element. |
permissions_policy_features.json5; Web Install explainer §New installation permission.
Errors and exact precondition order
Because navigator.install() returns a Promise, WebIDL overload/conversion failures and all precondition failures reject the returned promise rather than throwing synchronously. Chromium evaluates checks in the following exact order (verified in navigator_web_install.cc):
| Order | Rejection error | Condition | Recovery |
|---|---|---|---|
| 1 | TypeError (WebIDL binding) | Wrong argument type (including removed positional strings install(url)) or missing required manifest key in InstallParams. | Call navigator.install() or navigator.install({ manifest, manifestId }). |
| 2 | SecurityError | web-app-installation Permissions Policy blocks this document, or the document/frame has any sandbox flag set (even allow-scripts allow-same-origin). | Ensure policy allows self and invoke from a non-sandboxed top-level document. |
| 3 | InvalidStateError | Detached window, non-main frame (including same-origin <iframe>), prerendering document, fenced frame tree, or invalid script state. | Invoke only in an active, primary top-level browsing context. |
| 4 | NotAllowedError | No active transient user activation (note: a valid call consumes transient user activation immediately). | Invoke directly from a user click/keypress handler without awaiting unrelated async work first. |
| 5 | TypeError (URL validation) | manifest is empty, whitespace-only, or an invalid URL; or non-null manifestId is empty, whitespace-only, or an invalid URL. | Pass valid absolute or base-relative URLs; omit manifestId (or pass undefined/null) when relying on the manifest’s id. |
| 6 | AbortError | User denies the web-app-installation origin permission, cancels the install/launch confirmation UI, or the browser suppresses the flow (e.g., off-the-record/Incognito profile). | Treat as user cancellation; avoid re-prompting automatically without a new explicit click. |
| 7 | DataError | Current document has no linked manifest (0-arg); manifest fetch fails (fetched with credentials: "omit"); malformed manifest; manifest origin differs from start_url origin; manifest has no id when manifestId was omitted; or manifestId does not match the computed manifest ID. | Verify the manifest URL returns valid JSON with an explicit id (or supply the exact computed manifestId). |
navigator_web_install.cc; WPT navigator-install-sandboxed-iframe; WPT navigator-install-user-activation.
Context and exposure
navigator.install() is exposed on Window (via Navigator) in Secure Contexts (https:// or localhost) only; it is not defined on HTTP origins (verified by WPT navigator-install-not-defined.tentative.http.html) and is not exposed in Workers. Calls are restricted to non-sandboxed, primary top-level browsing contexts (disallowed in all iframes, fenced frames, and prerendering pages) with transient user activation and web-app-installation Permissions Policy allowance. Web app installation is not available in Incognito / off-the-record profiles.
navigator_web_install.idl; Blink navigator_web_install.cc; Web Install explainer §Private / Incognito.
Lifecycle and state transitions
When invoked on a user gesture, the browser: (1) checks Permissions Policy, document/frame/sandbox preconditions, and consumes transient user activation; (2) parses and resolves manifest and optional manifestId against the current document’s base URL; (3) for explicit-manifest calls, checks or prompts for the origin’s web-app-installation permission; (4) fetches the manifest with credentials mode "omit" (no cookies) without loading the target app’s document, validates JSON and same-origin start_url, and verifies the manifest’s explicit or computed id; (5) presents browser-controlled install confirmation UI (or a launch prompt if already installed); and (6) resolves with {} on acceptance or rejects with AbortError/DataError. Because the target app’s page is not loaded during explicit-manifest installation, its service worker is not registered until the installed app is launched.
Examples
No interactive Chrome Platform Showcase demo exists yet for v158/web-install-api (checked 2026-11-24). Live external samples from the feature authors are available at MicrosoftEdge PWA Install API Demo and Web Install manifest-URL demo.
Installing the current document’s web app (0-argument overload)
const installSelfBtn = document.querySelector("#install-self");
if (typeof navigator.install === "function") {
installSelfBtn.hidden = false;
installSelfBtn.addEventListener("click", async () => {
try {
// Requires the current page's linked manifest to declare an explicit "id"
await navigator.install();
installSelfBtn.textContent = "Installed";
} catch (err) {
if (err.name === "AbortError") {
// User dismissed the install dialog; no error UI required
return;
}
console.error(`Install failed (${err.name}):`, err.message);
}
});
}
Source: WICG Web Install draft; Web Install explainer §Sample code.
Checking permission and installing a cross-origin app by manifest URL
const installCatalogAppBtn = document.querySelector("#install-catalog-app");
async function canOfferBackgroundInstall() {
if (typeof navigator.install !== "function") return false;
if (!navigator.permissions?.query) return true;
try {
const { state } = await navigator.permissions.query({
name: "web-app-installation",
});
return state !== "denied";
} catch {
return true;
}
}
installCatalogAppBtn.addEventListener("click", async () => {
if (!(await canOfferBackgroundInstall())) {
// Fallback: link directly to the app so the user can install it there
window.open("https://music.example/", "_blank", "noopener");
return;
}
try {
await navigator.install({
manifest: "https://music.example/manifest.webmanifest",
// Optional only if the target manifest explicitly defines "id"
manifestId: "https://music.example/app",
});
console.log("Web app installed successfully.");
} catch (err) {
switch (err.name) {
case "AbortError":
console.info("User cancelled permission or install confirmation.");
break;
case "DataError":
case "TypeError":
console.error("Invalid manifest URL, fetch failure, or manifestId mismatch.");
break;
case "NotAllowedError":
console.warn("Must be called directly inside a user gesture.");
break;
default:
console.error(`Unexpected install error (${err.name}):`, err.message);
}
}
});
Source: Web Install explainer §New installation permission; Blink navigator_web_install.cc.
Browser compatibility
| Browser / platform | Support | Notes & evidence |
|---|---|---|
| Chrome (desktop) | 158 | Enabled by default on desktop per ChromeStatus 5183481574850560 and Blink runtime_enabled_features.json5. BCD api/Navigator.json currently lists 159. |
| Chrome (Android) & WebView | No | WebAppInstallation is explicitly disabled on Android, iOS, and Fuchsia in Blink runtime_enabled_features.json5 (ChromeStatus android and webview are null; BCD currently lists mirror). |
| Edge | 158 (desktop) | Co-authored by Microsoft Edge; mirrors Chromium desktop per BCD and ChromeStatus. |
| Firefox | No | Not supported; Mozilla standards position: No signal. |
| Safari / WebKit | No | Not supported; WebKit standards position: Oppose. |
api/Navigator.json; wpt.fyi web-install.
Security and privacy
Allowing one origin to initiate installation of a cross-origin web app introduces spam, spoofing, cross-origin probing, and credential-leakage risks. The specification and Chromium implementation enforce multiple safeguards:
- No unattended installs & clear attribution: Transient user activation is consumed on every call, and the browser always displays a browser-controlled confirmation dialog identifying the requesting site and target app.
- Origin-scoped permission for background/cross-origin installs: Requesting origins must hold the
web-app-installationpermission before installing apps other than the currently loaded document, allowing users to block abusive catalogs persistently. - Credential-free manifest fetch & same-origin manifest constraint: Explicit-manifest requests are fetched with credentials mode
"omit"(no cookies or auth headers) and are subject to Local Network Access checks; the manifest URL must be same-origin with its resolvedstart_url. - Minimal state disclosure: Successful installs resolve to an empty
WebInstallResult({}), and already-installed apps follow the same confirmation/AbortErrorcontract rather than returning an installation-status oracle. Off-the-record/Incognito profiles avoid immediate distinguishable failure signals. - Strict framing & origin isolation: Disallowed in all iframes, sandboxed documents, fenced frames, and prerendering pages; installed apps never inherit permissions from the installing origin.
Specifications
| Specification | Section |
|---|---|
Web Install / <install> Element (WICG Draft Community Group Report) | Navigator.install(), InstallParams, and WebInstallResult |
| Web Application Manifest (W3C Working Draft) | id member & start_url member |
| Permissions (W3C Working Draft) & Permissions Policy | "web-app-installation" permission descriptor & policy directive |