demo · v134
launch_handler modes — focus-existing vs. new-window
Bringing nav-capture to desktop wasn’t just plumbing — the manifest launch_handler.client_mode field had to mean something concrete on a windowing system. The two named cases from the explainer: a chat PWA that should always focus its existing window (deep-link into a conversation), and an editor that wants every link to open a fresh window. Pick a mode, fire links, watch the simulated desktop respond.
probing launch_handler manifest support…
User navigation capturing requires the page to be installed as a PWA on desktop. The boxes below model the desktop behaviour using the rules from the Web App Manifest spec.
Pick client_mode
navigate-new
Every captured link opens a new window. The editor case — each document is its own window.
navigate-existing
Reuse the existing window; replace its content. Default for single-instance apps.
focus-existing
Bring the existing window to the foreground; don’t navigate. Lets a service worker decide what to render (the chat-deep-link case).
Fire some links
Simulated desktop
The manifest fragment
{
"name": "App",
"start_url": "/",
"display": "standalone",
"launch_handler": {
"client_mode": "focus-existing"
}
}