Improve compatibility of protocol_handlers with registerProtocolHandler
Categories
(WebExtensions :: Compatibility, enhancement, P5)
Tracking
(Not tracked)
People
(Reporter: fredw, Unassigned)
Details
Attachments
(1 obsolete file)
Navigator.registerProtocolHandler is defined here:
https://html.spec.whatwg.org/multipage/system-state.html#custom-handlers
- It accepts two arguments "scheme" and "url".
- "title" is being removed (bug 1631464)
Microsoft is working on a proposal for PWA which will be using the same arguments (it seems they mistakenly renamed "scheme" to "protocol" though):
https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/master/URLProtocolHandler/explainer.md#url-protocol-handler-registration-for-pwas
Igalia is interested in implemented protocol_handlers in Chromium's extension, we will likely follow the HTML spec and Microsoft's PWA proposal.
Current Mozilla's WebExtensions is as follows:
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/protocol_handlers
- "protocol" is mandatory, equivalent to registerProtocolHandler's "scheme"
- "uriTemplate" is mandatory, equivalent to registerProtocolHandler's "uri"
- "name" is mandatory, equivalent to the removed registerProtocolHandler's "title"
This bug is to propose to provide new keys "scheme" and "uri" that can be used instead of "protocol" and "uriTemplate". "name" would become optional, the prompt can use a string with the overridden scheme in place of a developer-specified string. This would improve compatibility with Chromium and make things more consistent with HTML.
Reporter | ||
Comment 1•4 years ago
|
||
Comment 2•4 years ago
|
||
Shouldn't the key be "url
" for improved compatibility? (And for consistency with the web platform.)
Reporter | ||
Comment 3•4 years ago
|
||
(In reply to Anne (:annevk) from comment #2)
Shouldn't the key be "
url
" for improved compatibility? (And for consistency with the web platform.)
Right, it should be url
, not uri
.
Reporter | ||
Comment 4•4 years ago
|
||
Ideally, we should also unify the two sets of whitelisted protocols.
Updated•4 years ago
|
Reporter | ||
Comment 5•4 years ago
|
||
Just for the record, the current plan is likely to be:
- Keep "protocol"
- Add "url" as an alias for "uriTemplate" and deprecate the latter.
- Make "name" optional
Comment 6•4 years ago
|
||
Moving off our triage list, to P5 since this is a contributor patch that will come later when its ready.
Updated•4 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•2 years ago
|
Reporter | ||
Comment 7•2 years ago
|
||
Not working on this anymore.
Description
•