Resume
← Blog

2026.11.22 · 4 min · html · browsers · javascript · news

The HTML install element: one tag for a PWA install button.

Chrome and Edge 158 ship <install> on desktop: a browser-owned install button for your PWA that replaces the beforeinstallprompt script. What it needs (a manifest id), what it ignores (scripted clicks), what Safari and Firefox users see, and the old tutorials to stop copying. As of 2026.11.

Every PWA install button today is the same small ritual: catch beforeinstallprompt, stash the event, show a button, call prompt() on click, hide it again. That event is Chromium-only and non-standard, so in Safari and Firefox the button simply never shows up. In Chrome and Edge 158 on desktop, one tag does the job: <install></install>.

Watch the 60-second version on Instagram.

Before and after

Here's the pattern most PWAs ship today. Seventeen lines, all to show one button:

install-button.html (before)
<button id="install" hidden>Install app</button>
<script>
  let deferredPrompt;
  const btn = document.querySelector('#install');
 
  window.addEventListener('beforeinstallprompt', (e) => {
    e.preventDefault();            // stop Chrome's mini-infobar
    deferredPrompt = e;            // save it for later
    btn.hidden = false;
  });
 
  btn.addEventListener('click', async () => {
    btn.hidden = true;
    deferredPrompt.prompt();
    const { outcome } = await deferredPrompt.userChoice;
    deferredPrompt = null;
  });
 
  window.addEventListener('appinstalled', () => (btn.hidden = true));
</script>

And here's the same thing in Chrome and Edge 158:

install-button.html (after)
<link rel="manifest" href="/manifest.webmanifest">
 
<install>
  <a href="/how-to-install">How to install this app</a>
</install>
JS · 17 LINESHTML · 3 LINES<install> <a href="…">How to install</a></install>CHROMIUM ONLYCHROME / EDGE 158FIG. 01 / 17 LINES, THEN 3

With no attributes, <install> installs the app whose manifest the current page links. The catch: that manifest must be linked with rel="manifest" and declare an explicit id. Without one, the empty tag doesn't work.

If you want to know how it went, listen for installresult:

result.js
document.querySelector('install')
  .addEventListener('installresult', (e) => console.log(e.result));
// "success", "aborted" or "invalid-data"

"success" also covers "already installed, and the user opened it". You can't tell the two apart.

The browser draws the button

The browser controls the button's text, icon and look, so you get very little styling control. It may also add anti-clickjacking and cooldown limits. And it only reacts to a real click: a scripted el.click() has isTrusted false and is ignored. Clicking opens the browser's own install dialog, and the user still has to confirm.

That's the answer to the most reasonable worry in the Hacker News thread, that pages will fake install buttons. A page can't fake this one, because the page doesn't draw it.

It also won't run everywhere on a page: sandboxed iframes, fenced frames and other non-top-level frames get an illegal_subframe or illegal_sandbox instead.

What Safari and Firefox users see

The children of <install> are fallback content. When the browser renders its native button, they're hidden. In a browser that doesn't know the tag, they render like any other HTML.

<install><a>…</a></install>CHROME 158SAFARI / FIREFOXINSTALLBROWSER-OWNEDHow to install this appFALLBACKFIG. 02 / ONE TAG, TWO BROWSERS

That's the nice part of the design. Safari and Firefox never fired beforeinstallprompt either, so those users never saw your old button. Now they get whatever you put inside the tag. Make it a link to a "how to install" page, and don't style it to look like a fake install button.

Support, as of 2026.11

Browser<install>
Chrome 158, desktop (stable 2026.11.17)Enabled by default
Edge 158, desktop (2026.11.19)Enabled by default
Chrome on AndroidNot yet, and no Android WebView plan
Safari / WebKitOpposes it (position set 2026.05.26)
FirefoxNo position

Desktop means Windows, macOS, Linux and ChromeOS. navigator.install() ships alongside it, as the JavaScript version.

So "it replaces beforeinstallprompt" is true on desktop Chrome and Edge only. beforeinstallprompt isn't deprecated, and if you need installs on Chrome for Android, keep the old script as well.

What people get wrong

  • "The attribute is installurl." That was the origin trial (Chrome 148 to 153), with promptaction and promptdismiss. That design ends with the trial. To install another app, the shipped tag uses manifest (that app's manifest URL), plus manifestid if that manifest has no id. In script, the property is manifestId.
  • "It auto-installs." No. A real user click on the browser's button, then the browser's own confirm dialog.
  • "I can trigger it from JavaScript." Not by clicking the element. Scripted clicks are ignored.
  • "It shipped in 156." The Intent to Ship said 156; it slipped to 158.

On a client PWA I'd ship the tag on desktop now, keep the beforeinstallprompt script for Chrome on Android, and give the fallback link a real install guide, because that's what every Safari user will see.

The short version

  1. <install></install> renders a browser-owned install button in Chrome and Edge 158 on desktop.
  2. The empty tag installs the current page's app; its manifest must have an id. For another app, use manifest (and manifestid).
  3. Only a real click works, and the browser's dialog asks the user to confirm.
  4. Browsers without it render the tag's children, so put a "how to install" link inside.
  5. Chrome on Android still needs beforeinstallprompt; Safari opposes the tag and Firefox has no position.

Sources: Chrome blog, the install element origin trial · chromestatus, HTML install element · WICG, Web Install spec · Microsoft Edge 158 release notes · Chrome, Installing web applications · MDN BCD, BeforeInstallPromptEvent · Chromium Dash, M158 schedule · chromestatus, M158 features · blink-dev, Intent to Ship · WebKit standards position · Mozilla standards position · WICG, install element explainer · Hacker News thread