proposals icon indicating copy to clipboard operation
proposals copied to clipboard

Share Button Type

Open adactio opened this issue 5 years ago • 3 comments

Introduction

The Web Share API provides a means “for sharing text, URLs and images to an arbitrary destination of the user's choice”. The most basic sharing use case is sharing the current page (especially important in progressive web apps that launch with a display value of “standalone” or “fullscreen”). A declarative option that meets this basic use case would enable authors to provide this functionality without requiring knowledge of JavaScript.

A value of “share” for the type attribute of the button element would allow authors to provide an interface element for sharing the current web page.

The content model for the button element allows for its type attribute to be extended in this way while allowing backwards-compatibility with non-supporting browsers. Support for a value of "share" can be tested in the same way that supported values for input types can.

Here's a polyfill.

Read the complete Explainer.

Feedback

I'm currently gathering feedback on existing usage of the Web Share API to verify that sharing the current page URL is a common use case.

I welcome feedback in this thread, but encourage you to file bugs against the Explainer.

adactio avatar Oct 20 '20 15:10 adactio

I know it's mentioned in the explainer, but I think it's worth pointing out the source for historical reasons: https://twitter.com/AdaRoseCannon/status/1384639188700733443?s=20 😉

paulmelero avatar Apr 26 '21 14:04 paulmelero

Hey @adactio! Have you considered posting something to this effect in https://github.com/openui/open-ui/issues?

Should we "move" this issue there? It seems like that where most implementers with interest in extending HTML are at these days..

yoavweiss avatar Mar 06 '24 08:03 yoavweiss

Hey @adactio! Have you considered posting something to this effect in https://github.com/openui/open-ui/issues?

Looks like it's already there: https://github.com/openui/open-ui/issues/974

adactio avatar Apr 02 '24 09:04 adactio