Share Button Type
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.
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.
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 😉
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..
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