-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Needs a way to specify the ShareData parameter to Web Share API's share method #4
Comments
Hi Maciej, The use case for the declarative button isn't to cover all the uses of the Web Share API—the idea isn't that it's a one-to-one copy—but rather to cover one use case; sharing the URL of the current page. If you need to more than that (like the Mastodon example), then the existing JavaScript API is the way to go.
On the contrary, this appears to be the most common usage of the Web Share API by quite some way. Hence the idea of paving that particular cowpath. I'm actively looking for uses of the Web Share API here: #1 If you have access to any data on how the API is being used (telemetry?) it would be great to some more info!
…which isn't always available. Like, for example, a progressive web app (excuse me, home page app) launched with minimal-ui or fullscreen. |
Not sure how I missed this repo. Awesome! I pulled some data from HTTP Archive using the following query. 1,648,176 responses body has a reference to SELECT
COUNT(*) AS count_of_origins,
REGEXP_EXTRACT(body, r'navigator.share\([^\)]+\)') AS text
FROM `httparchive.response_bodies.2023_06_01_mobile`
WHERE body LIKE '%navigator.share(%'
GROUP BY 2
ORDER BY 1 DESC (take with a grain of salt as there are false positives and missing info - i.e, the regex doesn't work well with functions as arguments etc) I've tabulated some sample results and looked at some of the reponses to see if I can work out what things like
Hope this helps. |
Declarative UI for Web Share API seems like a cool idea. However, this proposal is missing a way to provide the equivalent of the
ShareDate
dictionary that's passed to the Web Share API'sshare
method. The goal of the Web Share API is to enable sharing objects that are represented by part of the page, not to share the page itself, as the user flow here seems to assume. An example would be, in a Mastodon web client, have buttons that can share an individual Toot, rather than the link to the user's whole Mastodon feed. Declarative buttons to invoke Web Share API for part of the page seem super useful. A button to share the page itself is not very useful. Websites don't use Web Share API for that today very much (afaik) and it's duplicative of the share button in the browser chrome.The text was updated successfully, but these errors were encountered: