DEV Community

Cover image for Web Share API: One Byte Explainer ✍️
Rajeev R. Sharma
Rajeev R. Sharma Subscriber

Posted on • Edited on

2 1 1 1

Web Share API: One Byte Explainer ✍️

This is a submission for DEV Challenge v24.03.20, One Byte Explainer: Browser API or Feature.

Explainer

Web Share APIs are used to share text, links, files and other contents in web apps by showing the native share dialogs.

navigator.canShare() validates content shareability, and navigator.share() opens the native share dialog.

Additional Context

Web Share APIs use the web-share permission policy, and your app must have the permission granted for the API to work. Also, the sharing must be triggered by a UI event (e.g. button click).

For more information you can visit the MDN docs

Other Resources

  1. A related real life issue I faced while using the Web Share API & the clipboard API

  2. Learn how to make your app receive the shared content and appear in the native share dialogs: Web Share Target API

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up