WebAppLaunch: user activation on focus-existing launch delivery
- Category
- Capabilities (Fugu)
- Type
- No developer-visible change
- Status
- Proposed (Chrome Proposed)
- Intent stage
- None
WPT details: Web Platform Tests or other automated test description launch_handler has no WPT coverage because installing a web app is not testable in WPT. Covered by Chromium browser_tests: WebAppLaunchHandlerBrowserTest*.UserActivation (enabled fixture asserts isActive is true and window.open() returns a window; disabled fixture asserts the opposite)
Summary
Grants transient user activation to an installed web app's existing window when a launch is delivered into it through the launch_handler "focus-existing" client mode. Today the launchQueue consumer runs without activation even though the user clicked a link, shortcut, file, or share that caused the launch, so the page cannot call activation-gated APIs such as window.open() or requestFullscreen() in response. With activation granted at delivery, apps that use focus-existing to avoid duplicate windows can still open a separate window when the launched URL belongs to a different document or workspace, in the same way a click on a Notification created by the page already activates that page.
Motivation
launch_handler "focus-existing" routes every launch into the most recently used app window and delivers LaunchParams with no user activation, so the launchQueue consumer cannot open a window for a launch that belongs to a different document or workspace, nor call other activation-gated APIs. Each launch is one user action outside the app. Precedent: a click on a Notification created by the page activates that page; notificationclick grants a service worker window interaction. Developer report: https://github.com/WICG/manifest-incubations/issues/141
Standards & signals
- Specification: https://wicg.github.io/web-app-launch/#dfn-prepare-an-application-context
- Firefox: No signal
- Safari: No signal
- Web developers: Positive
- Tracking bug: https://crbug.com/583976233
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=webapplaunch-user-activation-on-focus-existing-launch-delivery
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+WebAppLaunch%3A%20user%20activation%20on%20focus-existing%20launch%20delivery
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=WebAppLaunch%3A%20user%20activation%20on%20focus-existing%20launch%20delivery
- Baseline status: https://webstatus.dev/?q=WebAppLaunch%3A%20user%20activation%20on%20focus-existing%20launch%20delivery
Explainers: https://github.com/WICG/web-app-launch/blob/main/launch_handler.md