Re: [w3c/manifest] should we standardize navigator.standalone ? (Issue #1092)

This is the first I'm hearing of `navigator.standalone`.

Q: Is there a difference between `navigator.standalone` and `matchMedia('(display-mode: standalone)').matches`? Does `navigator.standalone` return true for other non-browser display modes like `minimal-ui`, `fullscreen`, and future ones like `window-controls-overlay`?

I would prefer to have some way to express that as a CSS MQ. I seem to be able to express it using `matchMedia('not (display-mode: browser)').matches`, which is a bit of a mouthful, but makes sense using existing APIs. It was difficult to come up with that, but we can document it on MDN and elsewhere.

> It's slightly unfortunate that "standalone" will mean "installed" (as per the spec's definition)

I don't follow this (also, which spec?). If you use `navigator.standalone` on a browser tab inside an app scope, while that app is installed, it will still be false, right? So it doesn't mean "installed". Do you mean that it's unfortunate that it means "running in a separate window outside the browser" as opposed to "having display-mode standalone"? If so, yes, that's why I think it's OK to tell developers to use `matchMedia('not (display-mode: browser)').matches` to say exactly what they mean.

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

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

Received on Friday, 9 June 2023 00:55:54 UTC