この記事はまだボランティアによって 日本語 に翻訳されていません。ぜひ MDN に参加して翻訳を手伝ってください!
この記事を English (US) で読むこともできます。

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

Secure context
This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

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

Syntax

var canShare = navigator.canShare(data);

Parameters

data Optional
An object containing data to share that matches what you would pass to Navigator.share().

 

Return value

A Boolean. True if data can be shared with Navigator.share().

Exceptions

None.

Specifications

Specification Status Comment
Web Share API - Level 2
The definition of 'canShare' in that specification.
Draft Initial definition.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
canShareChrome No support NoEdge No support NoFirefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile No support NoFirefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support No

Legend

No support  
No support

ドキュメントのタグと貢献者

このページの貢献者: NotWoods, jpmedley
最終更新者: NotWoods,