demo · v132

Link playground — what the desktop browser does on each click target

Walk through the decision table the desktop installer uses. Same-app link, cross-origin link, anchor link, target=_blank link, programmatic location.href — each has a different verdict, sometimes per capture_links mode. Live probes show whether YOUR session is running as an installed app.

display: standalone: —
launchQueue: —
window-controls-overlay: —
link targetcapture_links: noneexisting-client-navigateexisting-client-eventnew-client
https://app.example/inbox (same scope)tabapp (nav existing)app (event)app (new window)
https://app.example/login#hashtabapp (nav)app (event)app (new)
https://other.example/foo (out of scope)tabtabtabtab
<a target="_blank"> same-scopetabapp (existing)app (event)app (new)
JS: location.href = "..." same-scopetabtab (same-window nav)tabtab
middle-click on same-scope linktabtabtabapp (new window)
// publisher manifest
{
  "scope": "https://app.example/",
  "start_url": "https://app.example/",
  "display": "standalone",
  "capture_links": "existing-client-event",
  "launch_handler": { "client_mode": "navigate-existing" }
}
User-initiated clicks (left-click, Enter on focused anchor) participate in capture; programmatic navigations and middle-clicks have their own rules. Capture only kicks in for installed apps in standalone display mode.

see also