WICG / portals

A proposal for enabling seamless navigations between sites or pages
https://wicg.github.io/portals/
Other
946 stars 66 forks source link

Custom protocol support #262

Open olanod opened 3 years ago

olanod commented 3 years ago

Not sure if this is supposed to work out of the box or explicitly forbidden but I imagine a nice to have feature would be to support navigation to an "unknown page", say I embed a shopping cart in a web site but I don't want to restrict users to a specific shopping cart, it should be the one of their preference.
If the URL is a custom protocol registered with navigator.registerProtocolHandler i.e. src="web+cart:foo" the portal should load the website that registered that protocol. But what if there is no page registered for said protocol? could there be a fallback URL or the portal being able to host <source> elements? or is an event emitted by the portal if the src is invalid or cannot be navigated to?

jeremyroman commented 3 years ago

How do <a> link navigations deal with this case? It probably would make sense for portals to behave similarly.