Definition
protocol_handlers (manifest field)
protocol_handlers is a manifest array such as [{"protocol": "web+music", "url": "/play?track=%s"}] that registers the installed app as a handler for a URL scheme. Clicking a web+music: link anywhere in the OS, after the user confirms a one-time permission prompt, opens the app at the given URL with %s replaced by the encoded link.
Custom schemes must be prefixed with "web+" (or be one of a short allow-list of existing schemes like mailto and tel) for security reasons — arbitrary protocol names like "myapp" are rejected by the spec.
Registration only takes effect after install; a site running as a normal open tab cannot claim a protocol handler, which keeps the feature from being abused by untrusted pages the user has merely visited.
The %s placeholder in the target URL is mandatory and is substituted with the percent-encoded value of the full activating URL, so the handler page must parse it back out with the URL/URLSearchParams API.
Browser support is currently limited to Chromium-based browsers; Safari and Firefox do not implement protocol_handlers as of this writing, per the MDN compatibility table at https://developer.mozilla.org/en-US/docs/Web/Manifest/protocol_handlers.