[w3c/manifest] `<install>` element + CSS media feature for declarative feature detection (or user intent detection) (Issue #1254)

saschanaz created an issue (w3c/manifest#1254)

```html
<style>
@media (installable) {
  .install-prompt {
    display: block
  }
}
</style>
<div class="install-prompt" hidden>
  Install me!
  <install>
</div>
```

I've been thinking of how could we make a declarative install API while also having the BIP-style browser guard against dark pattern (e.g.  immediate prompt on page load).

The idea is:

1. `installable` indicates that `<install>` will be rendered as install button by the user agent.
2. If not `installable`, `<install>` will be disabled and be rendered as if it's not supported at all.
3. `installable` may be false either because
   * the user agent does not support it at all
   * user agent thinks this website is not worth yet to make a user prompt (current BIP behavior?)
   * or by some user configuration ("don't show install prompt")
4. By making the install prompt template behind the media feature, the website can hide the install related context so that the website won't render like a broken page in non-installable context.  

Thoughts?

(I'm changing my mind about BIP behavior, as I notice that I argued against nondeterministic behavior and then I also argued that install element can promote dark pattern. I do not have a brilliant idea about a deterministic behavior that can prevent dark pattern, so I started to think that maybe it is acceptable to be nondeterministic, as long as it helps users.)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/manifest/issues/1254
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/manifest/issues/1254@github.com>

Received on Monday, 19 October 2026 17:35:13 UTC