v150 · Window Management

Window State Controls

Probe the proposed Promise-returning window-state methods and inspect exposed implementations. Each button invokes await window.maximize(), minimize() or restore() and reports whether the platform resolved it, rejected it, or did not expose the method in this build/context.

To test the current experimental implementation, use an installed desktop PWA with real transient activation and window-management permission. Current Chromium source has a flag, but ChromeStatus lists no milestone:
  1. Open chrome://flags/#enable-desktop-pwas-additional-windowing-controlsEnabled, or launch Chrome with --enable-blink-features=DesktopPWAsAdditionalWindowingControls.
  2. Install this site as an app. The current Working Draft requires state-changing calls from non-installed documents to reject with NotAllowedError; installation is an invocation condition, not a general feature-detection rule.
  3. Grant the window-management permission when prompted.
If any method is missing below, the demo says so honestly and never fakes a result.

Live capability probe

Current display-state: reading…
No calls yet — press a button above to invoke the real API.
// Additional Windowing Controls — window state (installed PWA + window-management permission)
try {
  await window.maximize();   // resolves once the window is maximized
} catch (err) {
  // NotAllowedError: policy/permission, not installed, no activation, or failed operation
  console.log('maximize() rejected:', err.name, err.message);
}

await window.minimize();
await window.restore();

// Read the resulting state back — no permission required:
const isMax = window.matchMedia('(display-state: maximized)').matches;

see also