Re: [w3c/manifest] Adding protocol handlers (#972)

Hola @marcoscaceres. 

> So, fundamental question is: what significant value does this add over the existing protocol handler API? 

We think it makes a lot of sense to allow a developer to register protocol handlers in the manifest. It is where they will also register file handlers, link handlers and share targets, all in a way that ties them up nicely with the application itself. 

Additionally, it is appropriate because they are linked to the app lifecycle, providing deregistration of those schemes once the app is uninstalled (unlike `registerProtocolHandler()`). 

From the UX side, if an application needed to register to handle N protocols upon installing, it's bad UX to prompt the user N times for the permissions. With the protocols installed from the manifest, the user would only get a permission prompt the first time they link on a link. 

Finally, we think it's about the constant evolution in HTML to make things more declarative. With the `protocol_handlers` member in the manifest, you don't need to rely on JS to register schemes for your installed app.

> Also, if the PWA is not installed, won't developers need to call `.registerProtocolHandler()` anyway to support users who don't want the app on their home screen, but still want protocol handler capabilities?

Yes, but both are valid. I may want to have both the "mailclient.com" in the browser and additionally have the "Mail Client PWA" registered as a handler for mailto://. (one through `registerProtocolHandler()` and the other one through the manifest). 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/manifest/pull/972#issuecomment-869583595

Received on Monday, 28 June 2021 10:54:29 UTC