Chrome 158 Ships the HTML Install Element: How to Use It

Chrome 158 adds an install element and navigator.install() for web app install buttons, including cross-origin. Manifest setup, examples and errors.

Ananya RaoAnanya RaoAuthor26 November 20264 min read 7 views

Researched and drafted with AI and reviewed by the Publisha team.

Chrome 158 Ships the HTML Install Element: How to Use It
In this article▾
  1. What shipped in Chrome 158
  2. Step 1: give your manifest an id
  3. Step 2: the declarative way, the <install> element
  4. Installing an app on another origin
  5. Listening for the result
  6. Step 3: the imperative way, navigator.install()
  7. The errors you'll actually see
  8. Which one should you use?

Chrome 158, scheduled for the Stable channel on 17 November 2026, ships two ways to let people install your web app from a button you place on the page: a new HTML element, <install>, and a JavaScript method, navigator.install(). Until now, the usual approach was to catch the beforeinstallprompt event and hope it fired. The new APIs are simpler, work across origins, and put the browser in charge of the button. Here's how both work, with small examples you can drop into a project, and the gotchas that will trip you up first.

What shipped in Chrome 158

The Chrome 158 release notes describe the <install> element as a way to trigger a web app install request from a manifest URL and an optional manifest ID, without JavaScript, including for apps on other origins. navigator.install() is the imperative version of the same capability.

Two controls exist for organisations: the WebAppInstallByUserEnabled enterprise policy can disable user installs, and the web-app-installation permissions policy can allow or block installs for specific origins or iframes.

Step 1: give your manifest an id

Both APIs care about your app's identity. Chrome's Modern Web Guidance on installing web apps says that to install the current page's app, the manifest must declare an id that is same-origin with the page, and the page needs a <link rel="manifest">. A minimal manifest:

{
  "id": "/",
  "name": "Field Notes",
  "start_url": "/",
  "display": "standalone"
}

Your app still needs whatever else makes it installable today, such as icons. The id is the new hard requirement. Pick it once and never change it: it's how the browser knows two installs are the same app.

Step 2: the declarative way, the <install> element

For the current app, the element needs no attributes at all:

<link rel="manifest" href="/manifest.webmanifest">

<install>
  <a href="/get-the-app">How to install Field Notes</a>
</install>

The browser draws the button itself, with its own label and icon. The content inside the element is fallback: per the guidance, child content "renders only in browsers that don't show the install control." So older browsers and non-Chromium browsers see your link, and nobody sees a dead button.

Why the browser controls the label: Chrome's origin trial announcement from May explains that because the browser decides the button's text, language and appearance, it can trust that the user meant to click it. That's also why you can't restyle it into something sneaky.

Installing an app on another origin

This is the genuinely new part. A directory, a company portal or a "tools we use" page can offer installs for apps hosted elsewhere:

<install manifest="https://notes.example.com/manifest.webmanifest"
         manifestid="https://notes.example.com/">
  <a href="https://notes.example.com/">Open Field Notes</a>
</install>

The guidance lists the requirements for that remote manifest: served over HTTPS, without credentials or redirects, with a JSON content type such as application/manifest+json, and with the manifest URL and the app's start_url on the same origin. CORS headers aren't required. If the manifest has no id, the computed ID is the start_url resolved against the manifest URL, so pass manifestid to be explicit.

Listening for the result

The element fires an installresult event, and event.result is "success", "aborted" or "invalid-data":

document.querySelector("install").addEventListener("installresult", (event) => {
  if (event.result === "invalid-data") {
    console.warn("Check the manifest URL and id");
  }
});

A heads-up if you tested during the origin trial (Chrome and Edge 148 to 153): the May post used an installurl attribute and different event names. Check your markup against the current guidance before you ship.

Step 3: the imperative way, navigator.install()

Use the JavaScript API when you need your own button design or a dynamic flow. Feature-detect first, and only show the button when it can work:

const button = document.querySelector("#install-button");

if (typeof Navigator.prototype.install === "function") {
  button.hidden = false;
  button.addEventListener("click", async () => {
    try {
      await navigator.install();
    } catch (err) {
      console.warn("Install did not complete:", err.name);
    }
  });
}

To offer a different app, pass its manifest: navigator.install({ manifest: "https://notes.example.com/manifest.webmanifest" }), adding manifestId if that manifest has no id.

The errors you'll actually see

  • NotAllowedError: no user activation. You must call install() directly inside the click handler. Awaiting a fetch first loses the activation.

  • DataError: the manifest is missing, unreachable, redirected or not JSON, a required field is missing, the start_url is cross-origin, or the id is absent or doesn't match.

  • AbortError: the user cancelled, permission was denied, or a navigation happened mid-install.

  • SecurityError: the permissions policy disabled it or the document is sandboxed.

One thing the promise won't tell you: the guidance says it resolves both when installation completes and when the user approves an action like opening an app that's already installed, and the page can't tell those apart. Don't build analytics that assume every resolve is a new install.

Which one should you use?

Chrome's own comparison rates the element higher on trust, because the browser controls the UI, and the API higher on customisation. My rule: use <install> by default, because it's one line of HTML with a built-in fallback, and reach for navigator.install() only when the design genuinely needs a custom control. Keep a beforeinstallprompt fallback for browsers without either, remembering it can only install the current app.

If you're using AI coding agents on this, the install guide is part of the Modern Web Guidance 1.0 set that agents can follow. And for the other big Chrome additions this autumn, see HTML-in-Canvas in Chrome 157 and retrying failed dynamic imports in Chrome 156.

The short version: add an id to your manifest today, put an <install> element with a sensible fallback link where your old "Install app" button was, and test it in Chrome 158 and one non-Chromium browser.

Ananya Rao

Written by

Ananya Rao

A Publisha editorial profile. Its stories are researched and drafted with AI and reviewed by the Publisha team.

Keep reading

More from Ananya Rao

More from Ananya Rao

More in Software Development

Have a story of your own?

Publisha is free to start. Write with AI that keeps your voice, and publish in a click.