A partial archive of discourse.wicg.io as of Saturday February 24, 2024.

Web Share Target API for websites to receive shared content

mgiuca
2016-11-24

A few months ago, I posted about the Web Share API allowing websites to share content. That API is now implemented in Chrome as a feature trial (going to stable channel in December, as navigator.share).

It was always our intention to put out another proposal for a way to have a site receive shared content (either from a web share or from native apps), and accordingly we’ve had the Web Share Target API explainer sitting around for quite some time. We’re now looking at the design and implementation of this API.

One suggestion we had from Shane Caraveo was to take inspiration from Mozilla’s Social Share API, specifically the shareURL template, which means we can re-use existing features of sites like Twitter and Facebook to just open a page with a URL pre-filled with the share metadata (rather than devising our own event handler scheme). This is a bit more limited than the event-based system we had in mind, but also a lot simpler, so we might look at that design first.

Marcos Caceres already imported our repo into WICG so if you have thoughts on that, please file bugs there. But I haven’t written up the new design yet.

Cheers Matt Giuca The Chrome Ballista Team

RobinLinus
2018-11-22

very useful !!

ericwilligers
2019-05-01

The Web Share Target API has been refined over the last few years. The latest spec uses a form submission metaphor, so files can be shared.