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.
--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.
| # | kind | targetURL | isActive (in consumer) | hasBeenActive | isActive +1 task | isActive +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)
- App shortcuts — right-click the app’s taskbar/dock icon (long-press on Android) and choose Launch again (shortcut A) or (shortcut B).
- OS launcher — start the app again from the Start menu, Launchpad, the shelf or the home screen.
- Captured link — from a normal browser tab, click this in-scope link (Chrome desktop routes it into the app when “open supported links” is on for the app).
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.