Closed bard closed 6 years ago
We now have a fairly comprehensive plan for this type of experience, which is to combine Approach 1 with the proposed launch
event. (Web Share Target is explicitly mentioned in that explainer doc.)
This allows you to use URL-based share targets rather than the more complex SW-event-based, but in the rare cases where a SW event is desired (and no UI should be shown), you can hook into the navigation, intercept it, cancel the window from being shown, display a notification instead, and do back-end processing.
Let me know if you think this solves your use case.
Indeed looks like it does. Is this in Chrome Canary or elsewhere already?
Is this in Chrome Canary or elsewhere already?
No, the launch event design is still being refined.
The currently implemented approach ("Approach 1" in the explainer document) doesn't serve well applications that are meant to receive frequent shares without interrupting user flow, such as bookmarking or web-clipping applications. Ideally these applications would receive and handle a share without needing a UI switch and extra interactions, showing at most an overlay notification to confirm a successful operation. Google Keep works like that, in fact.
With Approach 1, the UX involves a UI switch and two extra taps:
Please consider implementing Approach 2 as that would allow building a more appropriate UX.