v160 · capabilities (fugu) · launch handling

Consumer activation probe

The canonical check, exactly as the ChromeStatus entry describes it: read navigator.userActivation.isActive as the first line of your launchQueue.setConsumer() callback. This page is its own tiny installable app with "launch_handler": {"client_mode": "focus-existing"}; every launch the browser routes into the open window is logged with the activation state it arrived with.

Status: enabled by default in Chrome 160 on Windows, macOS, Linux, ChromeOS and Android (not WebView, not iOS). There is no enable flag — the change is guarded by a kill switch only. To reproduce the old behaviour on 160+, relaunch Chrome with --disable-features=WebAppLaunchHandlerUserActivation. The grant needs an installed app: a browser tab never receives a launch.

Where this page is running

Launch deliveries into this document

Each row is one real call of the consumer. isActive is read synchronously inside the callback; it is re-read after one task (as Chromium’s browser test does before calling window.open()) and again 6 s later, after transient activation has expired.

Deliveries received by launchQueue.setConsumer()
#kindtargetURL isActive (in consumer)hasBeenActive isActive +1 taskisActive +6 s
No launch delivered yet.

Waiting for a launch…

kind is a labelled heuristic: the first delivery that arrives while the document is still starting up is the navigating launch that created this document (activation from that path is not what this feature adds, and Chromium’s test expects isActive to be false there). Every later delivery was routed into the live document by focus-existing — that is where Chrome 160 grants activation.

Launch triggers (use them while the app window is open)

Tab-side baseline: the same API, with and without a gesture

Before Chrome 160 a launch consumer saw what a page sees with no gesture. These controls read the real navigator.userActivation in this document so you can recognise both states. They are not launches.

At page load (no gesture): reading…

Press a button to read the activation state.

the probe, verbatim

// manifest.json
{ "launch_handler": { "client_mode": "focus-existing" }, … }

// page
launchQueue.setConsumer((params) => {
  const active = navigator.userActivation.isActive;   // read FIRST
  // Chrome 160+: true for a user-initiated launch delivered into this
  //              already-open document (focus-existing).
  // Before 160 / kill switch off / navigating launch: false.
  console.log(params.targetURL, active);
});

Chromium grants the activation in LaunchQueue::SendLaunchParams() only when launch_params.user_initiated() && !launch_params.started_new_navigation() and the kill switch is on, and sends it on the same ordered channel as the LaunchParams, so it always lands before your consumer runs.

see also