web-platform-tests / interop

web-platform-tests Interop project
https://wpt.fyi/interop
318 stars 27 forks source link

Web Share API #711

Open BearCooder opened 2 months ago

BearCooder commented 2 months ago

Description

The Web Share API is an API for sharing text, links and other content to an arbitrary destination of the user's choice.

While it’s already possible for a user to share content from a webpage via native means, they have to locate the option in the browser menu, and even then, there’s no control over what gets shared. The introduction of this API allows developers to add sharing functionality into apps or websites by taking advantage of the native content sharing capabilities on a user’s device.

Unfortunately the cross browser support is still not great:

This would be a great oportunity to reach full support on all browsers.

Specification

https://www.w3.org/TR/web-share/

Additional Signals

Standards Positions

Developer discussions

There is plenty evidence that browser wide support for all methods is needed. People are asking all over again in different mediums why this feature does not work on specific browsers. Some examples:

The list can go on and on. Just google web share api and look at stackoverflow etc.

Polls & Surveys

https://2022.stateofjs.com/en-US/features/browser-apis/

From State of HTML 2023 preliminary results, Web Share API was among the features that respondents expressed the most interest for: https://github.com/web-platform-tests/interop/issues/550#issuecomment-1777758744. https://2023.stateofhtml.com

Browser bug reports

Other

https://w3c.github.io/web-share/

Web Share depends on Permission Policy. Test where Permission Policy is excluded: https://wpt.fyi/results/web-share?label=master&label=experimental&aligned&q=path%3A%2Fweb-share%20and%20not%20permissions-policy%20and%20not%20feature-policy

AshleyScirra commented 1 month ago

See also: Web Share API doesn't work in Android WebView - https://issues.chromium.org/issues/40540400