← Chrome 160 reference · All APIs
v160 · web api · pwa · enabled by default
WebAppLaunch: user activation on focus-existing launch delivery
Grants transient user activation (navigator.userActivation.isActive === true) to an installed web app’s existing document when a user-initiated launch is delivered into it via launch_handler: { "client_mode": "focus-existing" }. Inside the window.launchQueue.setConsumer() callback, the app can now call activation-gated APIs such as window.open(), Element.requestFullscreen(), showOpenFilePicker(), or navigator.share() — once per launch, mirroring how clicking a page-created Notification activates that document.
at a glance
| Shipped in | Chrome 160 (desktop, Android), enabled by default in the milestone=160 listing; Android WebView and iOS are null (not applicable) in the ChromeStatus API record |
|---|---|
| Kill switch / flag | No enable flag (enabled by default). Browser-side kill switch: kWebAppLaunchHandlerUserActivation in components/webapps/browser/features.cc — reproduce pre-160 behavior with --disable-features=WebAppLaunchHandlerUserActivation |
| Specification | Web App Launch Handler — Prepare an application context (merged in WICG/web-app-launch PR #101, 2026-11-11, closing issue #99) |
| Explainer | WICG/web-app-launch — launch_handler.md |
| Developer report | WICG/manifest-incubations#141 (positive developer signal) |
| Tracking bug | issues.chromium.org/583976233 |
| Tests | No WPT (app installation is untestable in WPT); covered by Chromium browser_tests (WebAppLaunchHandlerBrowserTest*.UserActivation) |
| ChromeStatus | 5191118118584320 — WebAppLaunch: user activation on focus-existing launch delivery |
why it exists
Installed web apps declare "launch_handler": { "client_mode": "focus-existing" } to keep a single window open instead of spawning duplicate windows when users click links, app shortcuts, files, or share targets. Before Chrome 160, focusing the existing window and invoking the window.launchQueue.setConsumer() callback did not grant transient user activation to the focused document — even though the launch was triggered by an explicit user click outside the app. Consequently, multi-document apps could not call window.open() to open a separate workspace window for an unrelated document, nor call requestFullscreen() or file pickers in response to the launch. Chrome 160 fixes this gap by running HTML’s activation notification steps for the focused document at launch delivery, matching the existing precedent for clicking a page-created Notification.
Syntax
No new JavaScript interface or manifest member is introduced. The change modifies the runtime behavior of the existing Web App Manifest launch_handler member ("client_mode": "focus-existing") and the window.launchQueue.setConsumer() delivery algorithm:
// Web App Manifest (manifest.webmanifest)
{
"launch_handler": {
"client_mode": "focus-existing"
}
}
// Application script — read navigator.userActivation.isActive inside the consumer
window.launchQueue?.setConsumer((launchParams) => {
if (navigator.userActivation.isActive) {
// Chrome 160+: activation-gated calls (e.g. window.open(), requestFullscreen()) succeed
}
});
“Bring application context’s viewport into focus. Run the activation notification steps for application context’s active document. Return application context.”
This reference covers three parts of the Chrome 160 contract: the focus-existing activation grant algorithm, conditions where activation is withheld, and the consumer activation budget & feature detection.
Source: Web App Launch Handler — Prepare an application context (normative quote fetched 2026-11-24); launch_handler.md.Focus-existing activation grant — inputs and outputs
Inputs. An installed web app whose manifest sets "launch_handler": { "client_mode": "focus-existing" } (or an array resolving to "focus-existing"), an already-open application window whose current URL is within the manifest scope and has a non-opaque committed origin, and a user-initiated launch event (clicking a captured link, app shortcut, OS launcher icon, associated file, Web Share target, or Trusted Web Activity launch).
Outputs. In components/webapps/browser/launch_queue/launch_queue.cc (SendLaunchParams()), Chromium verifies launch_params.user_initiated() && !launch_params.started_new_navigation() && base::FeatureList::IsEnabled(features::kWebAppLaunchHandlerUserActivation) and calls NotifyUserActivation(UserActivationNotificationType::kWebAppLaunch) on the primary main frame immediately before calling launch_service->EnqueueLaunchParams(...) on the same ordered Mojo associated channel. When the page’s launchQueue.setConsumer() callback runs, both navigator.userActivation.isActive and navigator.userActivation.hasBeenActive are true.
When activation is withheld — inputs and outputs
The specification and Chromium’s SendLaunchParams() strictly limit the grant so only genuine, fresh, user-initiated focus-existing deliveries receive transient activation:
| Launch scenario | Grants activation? | Reason |
|---|---|---|
User-initiated launch into open, in-scope focus-existing window | Yes (once) | user_initiated && !started_new_navigation; calls NotifyUserActivation(kWebAppLaunch) |
"navigate-new" or "navigate-existing" | No (via this step) | started_new_navigation is true; navigating launches use normal navigation semantics instead |
| Cold launch (no open window) or open window currently out of scope | No (via this step) | Falls back to creating or navigating a window (started_new_navigation is true) |
Re-delivery of LaunchParams (for example after reload) | No | Spec Privacy section forbids re-granting activation for the same launch |
| Non-user-initiated / programmatic launch | No | Spec MUST NOT run activation steps when user_initiated is false |
| Opaque committed origin or kill switch disabled | No | committed_origin.opaque() returns early; --disable-features=WebAppLaunchHandlerUserActivation skips notification |
Consumer activation budget, lifecycle, and timing
One launch, one transient activation. Standard HTML transient activation rules apply inside the launchQueue.setConsumer() callback:
- Consumption: Calling an activation-consuming API — such as
window.open(),Element.requestFullscreen(),window.showOpenFilePicker(), ornavigator.share()— consumes the transient activation budget immediately, so subsequent gated calls in the same callback fail unless the user interacts again. - Expiry: Transient activation expires automatically after a short timeout (typically ~5 seconds in Chromium) if not consumed, returning
navigator.userActivation.isActivetofalsewhilehasBeenActiveremainstrue. - Ordering guarantee: Because Chromium sends
NotifyUserActivation(kWebAppLaunch)on the same associated channel immediately ahead ofEnqueueLaunchParams(), the renderer observesnavigator.userActivation.isActive === trueon the very first line of the consumer callback (and across an immediate microtask/next task before expiry), provided the consumer is already registered when the launch arrives.
Errors, fallbacks, and feature detection
Launch delivery itself does not throw when activation is absent; instead, any activation-gated API your consumer calls will fail according to its own contract (for example window.open() returns null, and requestFullscreen(), showOpenFilePicker(), or navigator.share() reject with NotAllowedError / SecurityError).
- Feature detection: Inspect
navigator.userActivation.isActiveinside yourlaunchQueue.setConsumer()callback. Do not sniff the Chrome version, because activation can still befalseon Chrome 160+ for non-user launches, reloads/re-deliveries, late consumer registration after expiry, or enterprise kill-switch environments. - Graceful fallback: When
navigator.userActivation.isActiveisfalse(orwindow.open()returnsnull), render a clear in-app banner or button (for example “Open workspace in new window” or “Enter fullscreen”) so a single click completes the action on Chrome < 160 and non-activated paths.
Context and exposure
Applies exclusively to installed web applications (PWAs) running in a top-level secure Window application context with "launch_handler": { "client_mode": "focus-existing" } in their manifest. Regular browser tabs never receive Launch Handler deliveries, and Web Workers / Service Workers do not have a window.launchQueue or document-level UserActivation state.
Examples
The Chrome Platform Showcase publishes an interactive installable demo suite for this Chrome 160 feature. Install the concept app below, keep its window open, and relaunch it from a shortcut or link to observe navigator.userActivation.isActive live inside launchQueue.setConsumer():
Opening a separate workspace window from a focus-existing consumer with fallback
// manifest.webmanifest
// {
// "name": "Notebook Studio",
// "start_url": "/",
// "display": "standalone",
// "launch_handler": { "client_mode": "focus-existing" }
// }
const currentWorkspaceId = new URL(location.href).searchParams.get("workspace") ?? "default";
function showOpenWindowPrompt(targetUrl) {
const banner = document.getElementById("launch-banner");
const btn = document.getElementById("launch-open-btn");
btn.onclick = () => {
window.open(targetUrl, "_blank", "noopener");
banner.hidden = true;
};
banner.hidden = false;
}
if ("launchQueue" in window) {
window.launchQueue.setConsumer((launchParams) => {
if (!launchParams.targetURL) return;
const url = new URL(launchParams.targetURL);
const requestedWorkspace = url.searchParams.get("workspace") ?? "default";
if (requestedWorkspace === currentWorkspaceId) {
// Same workspace: route in-place without consuming activation
openDocumentInCurrentWindow(url);
return;
}
// Different workspace: check transient activation granted by Chrome 160+
if (navigator.userActivation?.isActive) {
const child = window.open(url.href, "_blank", "noopener");
if (child) return;
}
// Fallback for Chrome < 160, re-deliveries, non-user launches, or popup blockers
showOpenWindowPrompt(url.href);
});
}
Source: Web App Launch Handler specification; ChromeStatus 5191118118584320; Chrome Platform Showcase — Workspace router.
Launching a file directly into fullscreen presentation mode
if ("launchQueue" in window) {
window.launchQueue.setConsumer(async (launchParams) => {
const [fileHandle] = launchParams.files ?? [];
if (!fileHandle) return;
const file = await fileHandle.getFile();
await loadDeckIntoStage(await file.text());
const stage = document.getElementById("slide-stage");
// Only request fullscreen while the single-launch transient activation is still active
if (navigator.userActivation?.isActive) {
try {
await stage.requestFullscreen();
return;
} catch (err) {
console.warn("Fullscreen request failed:", err);
}
}
// Offer a one-click Present button when activation was absent or already expired
document.getElementById("present-btn").hidden = false;
});
}
Source: Web App Launch Handler — LaunchParams; Chrome Platform Showcase — Launch to present.
Browser compatibility
| Browser | focus-existing activation | Notes & evidence | Base launch_handler / LaunchQueue (BCD) |
|---|---|---|---|
| Chrome (desktop, Android) | 160 | Enabled by default on desktop and Android per ChromeStatus 5191118118584320 (kill switch WebAppLaunchHandlerUserActivation). Android WebView and iOS are unconfirmed/not applicable (null). | LaunchQueue 102 desktop (Android false in BCD); manifest launch_handler 110 |
| Edge | Unknown | Chromium-based; inherits Chromium 160 browser implementation; no separate BCD entry yet | 110 (mirror) |
| Firefox | No | Launch Handler not implemented; ChromeStatus records “No signal” | No |
| Safari | No | Launch Handler not implemented; ChromeStatus records “No signal” | No |
Security and privacy
Granting transient activation on focus-existing delivery is tightly scoped to prevent abuse:
- One-to-one user gesture mapping: One external user action (clicking a link, shortcut, file, or share) maps to at most one transient activation grant, matching the security model of
notificationclickwindow activation. - Installed, same-origin, opt-in scope: Only an installed web app that explicitly opted into
"client_mode": "focus-existing"with a focused, in-scope, non-opaque document receives the notification. - No replay or unprompted activation: The specification’s Privacy section normatively requires that user agents MUST NOT grant activation for launches not initiated by the user, and MUST NOT re-grant it for the same launch (such as re-delivering
LaunchParamsafter a page reload). - Ordered browser-to-renderer delivery: Chromium delivers
NotifyUserActivation(kWebAppLaunch)from the browser process on the same ordered Mojo associated channel asEnqueueLaunchParams(), ensuring the renderer cannot forge launch-triggered activation without a verified browser-side launch.
Specifications
see also
- Chrome Platform Showcase — WebAppLaunch: user activation on focus-existing launch delivery (5 interactive concepts)
- Chrome Platform Showcase — Conformance test suite
- MDN — Launch Handler API
- MDN —
LaunchQueue - Explainer —
launch_handler.md - WICG/manifest-incubations#141 — Original developer report
- ChromeStatus — WebAppLaunch: user activation on focus-existing launch delivery (5191118118584320)