Re: [w3c/manifest] Way to detect if a web app is installed (Issue #1092)

DanielHerr left a comment (w3c/manifest#1092)

I was describing what will happen with the currently proposed design of this feature, not bugs in Chromium today. 

Some web devs will write code like this:

```
if(window.standalone) {
  window.launchQueue.setConsumer((launchParams) => {
    do_something(launchParams.files)
  })
}
```
or
```
if(window.standalone) {
  navigator.setAppBadge(5);
}
```
or
```
@media (installed: yes) {
  #install_banner {
    display: none
  }
}
```

With the above proposed behavior of these APIs the user experience will be broken when the user chooses to run the PWA in a browser tab.

For a good user experience, the installed media query must apply equally when running in a display: browser context. If window.standalone goes forward it should be made very clear in any documentation that standalone app window modes are not equivalent to checking for PWA installation, and there should be an equally easy to use API like window.installed.

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

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

Received on Tuesday, 13 May 2025 23:52:49 UTC