Share Button Type #11
Labels
Category: HTML
For all HTML-related proposals (not only the HTML standard but any markup-related too).
Looking for interest
Incubation is currently seeking community interest
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 thebutton
element would allow authors to provide an interface element for sharing the current web page.The content model for the
button
element allows for itstype
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 forinput
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.
The text was updated successfully, but these errors were encountered: