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

benfrancis left a comment (w3c/manifest#1092)

Hmm, I checked the W3C specification for [`display-mode`](https://www.w3.org/TR/mediaqueries-5/#display-modes) and it does note that "The [fullscreen](https://www.w3.org/TR/mediaqueries-5/#display-mode-fullscreen) [display mode](https://www.w3.org/TR/mediaqueries-5/#display-mode) is distinct from the [Fullscreen API](https://www.w3.org/TR/mediaqueries-5/#biblio-fullscreen)."

> The [fullscreen](https://www.w3.org/TR/mediaqueries-5/#display-mode-fullscreen) [display mode](https://www.w3.org/TR/mediaqueries-5/#display-mode) describes the fullscreen state of the browser viewport, while the [Fullscreen API](https://www.w3.org/TR/mediaqueries-5/#biblio-fullscreen) operates on an element contained within the viewport. As such, a web application can have its display mode set to fullscreen, even while [fullscreenElement](https://fullscreen.spec.whatwg.org/#dom-document-fullscreenelement) returns null, and [fullscreenEnabled](https://fullscreen.spec.whatwg.org/#dom-document-fullscreenenabled) returns false.

However...

> "a side effect of calling the [requestFullscreen()](https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen) method on an element using the [Fullscreen API](https://www.w3.org/TR/mediaqueries-5/#biblio-fullscreen) can be that the browser enters a fullscreen mode at the OS-level, in which case both :fullscreen and (display-mode: fullscreen) will match."

So I see now why it may be difficult for a developer to distinguish between a document in an application context with the fullscreen display mode and a document in a browser tab which has been made fullscreen by the fullscreen API.

However, that is a bit of an edge case and I maintain that `window.standalone` as implemented in Safari only adds to this confusion.

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

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

Received on Thursday, 15 May 2025 13:18:39 UTC