4 ms·
It might be a bit of a chicken and egg issue at the moment: a native app is needed to be a share target (e.g. by custom protocol, or mailto as in your example),
by akdor1154 6y ago
It might be a bit of a chicken and egg issue at the moment: a native app is needed to be a share target (e.g. by custom protocol, or mailto as in your example), people don't really use native apps for these things any more, therefore widespread use is rare. There are some uses I can think of - e.g. Spotify registers a custom protocol handler, as does Steam.
But in general I would expect enabling websites to be receivers of shared data will enable some interesting new use cases.
As an example, I wanted to create a web extension to automatically add something to Anki via AnkiWeb. The share API seemed to be the natural way to do this, but with it unsupported on desktop, that approach was dead in the water.
- pojntfx 6y agoIt has not yet been implemented on the desktop, but the Web Share Target API seems to be the solution for the future: https://web.dev/web-share-target/ https://web.dev/web-share-target/ I absolutely second this btw. Being able to use something like https://snapdrop.net/ https://snapdrop.net/ from the share menu would finally add AirDrop-like convinience to the web.
- NightMKoder 6y agoI agree with both you and the parent from a principles perspective. There's no reason sharing on the web has to be somehow limited to whatever the website author chose to support. My problem is that this just isn't a pragmatic choice right now. The chicken-and-egg problem is somewhat true, but the carrot was already there for web devs - iOS and Android implement web share. And it's an excellent UX - better than anything you can make yourself. The problem with the desktop share experience is that it is strictly worse than putting 2-3 social buttons & copy link for 95% of people. Neither Facebook nor WhatsApp support the share target API right now (quick post-edit: Twitter does though). Even if they did, there's another hurdle [1]: To register your app as a share target, it needs to meet Chrome's installability criteria. In addition, before a user can share to your app, they must add it to their home screen. So, again, pragmatically what people are going to start doing is - change from "if (navigation.share)" to "if (navigator.share && isMobile)". And I think that sucks - there will have to be another slow-moving wave of change once the desktop share is "good enough" to enable for everyone. [1] - https://web.dev/web-share-target/ https://web.dev/web-share-target/