-
Notifications
You must be signed in to change notification settings - Fork 35
Description
We would like to allow Isolated Web Apps (IWAs) to display unframed windows. In this context, an unframed window is an app window displayed without the usual OS or user agent frame around the window, including the title bar, action buttons (maximize, minimize, close), or window borders. The web content is allowed full control over the window content.
The current proposal in the incubations spec introduces unframed as a general display_mode. That approach has the limitation that all windows of the IWA become unframed. Ideally an IWA can specify that some of its windows are unframed, not necessarily all of them.
Our new proposal is to do so by extending the display_override manifest field to accept JSON objects that include the display mode and a list of url_patterns where it applies. This accepts URL patterns as described in the URL pattern spec.
Example IWA manifest.webmanifest:
{
"display": "standalone",
"display_override": [
{
"display": "unframed",
"url_patterns": [
"/stream/*",
{ "pathname": "/popups/custom-ui/*" }
]
}
],
"permissions_policy": { "window-management": ["self"] },
...
}The user agent follows the standard process to identify an appropriate display mode in display_override, except now it must filter modes by the given url_patterns if one is present.
When a new window initial URL matches a pattern in url_patterns, it will be created in unframed display mode from the start, preventing any "flicker" where the new window briefly shows some UI element other than the app's.
See the explainer for more information.
We welcome community feedback on this proposal.
cc @dmurph