demo · v143

Install Prompt Explorer

A unified play space for all three navigator.install() signatures, side-by-side, with a live activity timeline. Each cell calls a different overload; the timeline shows the actual permission state, user gesture requirement, and the resolution path.

Origin trial / behind a flag: the Web Install API ships behind chrome://flags/#web-app-installation-api in Chrome 143. The demo attempts each call and prints whatever Chrome actually returned (resolved manifest URL, rejection reason, or "not implemented in this browser").

Prerequisites

navigator.install
checking…
Secure context
checking…
Permission policy
checking…
Manifest link tag
checking…

The three signatures

0 args — install self

navigator.install()
No arguments. Installs the current site as a PWA. Equivalent to the install button Chrome shows in the omnibox, but the page asks.

1 arg — install URL

navigator.install(url)
A single URL. Installs another page (same or different origin). The browser fetches its manifest, prompts, and installs the resolved app — not the install caller.

2 args — install manifest

navigator.install(url, manifestId)
URL plus an explicit id. Lets a storefront disambiguate when the target page declares multiple apps (or rewrites its manifest). The browser still verifies the id matches what the manifest declares.

Activity timeline

What you're looking at

  1. Probes test feature support, secure context, the web-app-installation permission policy, and whether the page has a manifest link.
  2. Each cell calls a different signature. The buttons are wired as direct event handlers so the call ships from a user-gesture stack — required by the spec.
  3. Resolved promises return the installed app's manifest URL. Rejections come as DOMException with names like NotAllowedError, AbortError, NoModificationAllowedError.
  4. Calling signature 1 against an unrelated origin shows the cross-origin prompt; signature 0 shows the in-page prompt.
// Sig 0 — install self
const url = await navigator.install();

// Sig 1 — install another origin
await navigator.install("https://example.com/app/");

// Sig 2 — disambiguate by manifest id
await navigator.install("https://example.com/", "https://example.com/app");

see also