Raymond Camden

Testing the Web Share API

Screenshot of “Testing the Web Share API”

So, one of the main benefits of progressive enhancement is providing additional capabilities where supported and failing gracefully. This seems like an API perfect for that. If the browser supports it, add a button, add the event listener, and you're good to go. For cases where a URL, or file, is not being shared, it does not seem to work well. For cases where you share a URL, it seems you can't ever count on the text or title to be available consistently. And sharing a file seems problematic. Honestly, I'm not sure I'd use this. When I started thinking about this API my plan was to actually use it here to enhance the sharing options you see at the bottom of the post. For now, I've changed my mind about that.