Limited support Limited browser support. Check compatibility before use.

Browser support

Feature Desktop Mobile
Chrome
Edge
Firefox
Safari
Chrome Android
Safari iOS
128
93
71
12.1
61
12.2
HTML attribute
allow (web-share)
86
86
81
86
DOM API

The canShare() method of the Navigator interface returns true if the equivalent call to navigator.share() would succeed.

128
93
96
14
75
14
canShare (data files parameter)

`data.files` parameter

89
81
14
76
14
canShare (data text parameter)

`data.text` parameter

89
81
96
14
76
14
share (data files parameter)

`data.files` parameter

89
81
14
76
14
share (data text parameter)

`data.text` parameter

89
81
71
14
76
14
Other
web-share
Experimental

The HTTP Permissions-Policy header web-share directive controls whether the current document is allowed to use the Navigator.share method of the Web Share API to share text, links, images, and other content to arbitrary destinations of the user's choice.

88
88
88
1+Supported (version) Not supported Has note Sub-feature descriptions sourced from MDN Web Docs (CC BY-SA 2.5)
Notes 3 item(s)
Limitation
  • This browser only partially implements this feature
Removed
  • This feature was removed in a later browser version (128)
Implementation note
  • Only supported on ChromeOS and Windows, see bug 40542648 and bug 40729163.
Notes 3 item(s)
Limitation
  • This browser only partially implements this feature
Removed
  • This feature was removed in a later browser version (93)
Implementation note
  • Only supported on Windows.
Notes 1 item(s)
Experimental
  • Requires an experimental browser flag to be enabled
Notes 1 item(s)
Implementation note
  • Firefox recognizes the `web-share` permissions policy, but this has no effect in versions of Firefox that do not support the `share()` method.
Notes 3 item(s)
Limitation
  • This browser only partially implements this feature
Removed
  • This feature was removed in a later browser version (128)
Implementation note
  • Only supported on ChromeOS and Windows, see bug 40542648 and bug 40729163.
Notes 3 item(s)
Limitation
  • This browser only partially implements this feature
Removed
  • This feature was removed in a later browser version (93)
Implementation note
  • Only supported on Windows.
Notes 1 item(s)
Experimental
  • Requires an experimental browser flag to be enabled
Notes 1 item(s)
Experimental
  • Requires an experimental browser flag to be enabled
Notes 1 item(s)
Experimental
  • Requires an experimental browser flag to be enabled

Syntax

JAVASCRIPT
share(data)

Use cases

  • Using navigator.share()

    The share() method of the Navigator interface invokes the native sharing mechanism of the device to share data such as text, URLs, or files.

Cautions

  • Limited browser support. Check compatibility before use.

Implementation notes

  • Some APIs require a secure context (HTTPS) or user activation. Check the requirements before use.