* 仕様書

[REFS[
- [7] [CITE@en[Web Share API]] ([TIME[2017-07-13 13:23:28 +09:00]]) <https://wicg.github.io/web-share/>
]REFS]

* 引数

[19] 
[CODE[url]] に [CODE[URL]] [[オブジェクト]]を渡すと、
[[Windows]] の [[Chrome]] や [[iOS]] の [[Safari]]
は[[文字列化]]して [[URL]] として解釈して[[共有]]ダイアログが表示されます
(正しい動作)。

[20] ところが [[iOS]] の [[Chrome]] だけは、なぜかなにも表示しません。
はじめから[[文字列]]を渡すことで回避できます。
[TIME[2021-03-17T06:39:19.100Z]]

* 処理

[17] [CODE[Promise]] が返されます。[[共有]]画面が開かれた後、[[満足]]されます。

[21] 
[[Windows]] [[Chrome]] では、
[[利用者]]が選択したり閉じたりする前に[[満足]]されます。
[TIME[2021-03-17T06:39:38.500Z]]

[22] 
[[iOS]] [[Chrome]] では、
[[利用者]]が閉じてから[[満足]]されます。
[TIME[2021-03-17T06:40:02.00Z]]

* 実装

[8] [[Android]] 版の [[Chrome]] が対応しています。[[共有]]画面が[[モーダル]]風に表示されます。

[9] [[Windows]] 版の [[Chrome]] は対応していません。
[CODE[navigator.share]] 自体が存在しません。
[TIME[2017-10-02T13:45:41.300Z]]

[16] 
[[Windows]] 版の [[Chrome]] も対応しました。
[[Windows]] 標準の[[共有]]画面が表示されます。
[TIME[2021-03-17T06:10:36.700Z]]

[18] 
[[iOS]] 版の [[Safari]] や [[Chrome]] も対応しています。
[TIME[2021-03-17T06:10:35.200Z]]


[25] 
[[Mac]] 版の [[Chrome]] はまもなく対応する模様です。 [SRC[>>24]]

-*-*-

[10] [[Android]] では候補に[[クリップボード]]に[[コピー]]する選択肢がでてきますから、
[[URL]] を[[利用者]]に与えたい時には[[クリップボード]]に[[コピー]]を直接実装するよりも便利かもしれません。

[11] ただし他の候補で公開の [[SNS]] アプリが出てきたりするので、
[[capability URL]] など非公開の [[URL]] を提示する時に使うのは避けたほうが無難です。

-*-*-

[28] 
[CODE[files]] には [[Windows]] の [[Chrome]] も
[[Android]] の [[Chrome]]
もまだ対応していないようです。
[TIME[2021-06-23T11:00:13.300Z]]

* 歴史

[29] [[Web Intents]]

[1] [CITE@en[web-share/interface.md at master · mgiuca/web-share]]
([TIME[2016-12-22 01:21:04 +09:00]])
<https://github.com/mgiuca/web-share/blob/master/docs/interface.md>

[2] [CITE@en[New In Chrome 55  |  Web  |  Google Developers]]
([TIME[2016-12-22 00:35:56 +09:00]])
<https://developers.google.com/web/updates/2016/11/nic55>

[3] [CITE@en[web-share/explainer.md at master · mgiuca/web-share]]
([TIME[2016-12-22 01:22:09 +09:00]])
<https://github.com/mgiuca/web-share/blob/master/docs/explainer.md>

[4] [CITE@en[web-share/interface.md at master · mgiuca/web-share]]
([TIME[2016-12-22 01:23:32 +09:00]])
<https://github.com/mgiuca/web-share/blob/master/docs/interface.md>

[5] [CITE@en[WICG/web-share: Web API proposal for sharing data from a web page]]
([TIME[2017-06-01 17:51:16 +09:00]])
<https://github.com/WICG/web-share>

[6] [CITE@en[Introducing the Web Share API  |  Web  |  Google Developers]]
([TIME[2017-09-18 12:54:25 +09:00]])
<https://developers.google.com/web/updates/2016/09/navigator-share?utm_source=feed&utm_medium=feed&ut>



[12] [CITE@en[RFP: Web Share API · Issue #27 · mozilla/standards-positions]]
([TIME[2018-04-05 14:25:52 +09:00]])
<https://github.com/mozilla/standards-positions/issues/27>

[13] [CITE@en[Add Web Share and Web Share Target APIs to charter · Issue #105 · w3c/WebPlatformWG]]
([TIME[2018-04-05 14:38:02 +09:00]])
<https://github.com/w3c/WebPlatformWG/issues/105>

[14] [CITE@en[Web Share API · Issue #179 · w3ctag/design-reviews]]
([TIME[2018-04-05 14:41:50 +09:00]])
<https://github.com/w3ctag/design-reviews/issues/179>

[15] [CITE@en[Safari 12.1 Release Notes | Apple Developer Documentation]]
([TIME[2019-02-10 12:07:40 +09:00]])
<https://developer.apple.com/documentation/safari_release_notes/safari_12_1_release_notes>

[23] [CITE@en[chore: inform people that l2 is folded into main spec by marcoscaceres · Pull Request #134 · w3c/web-share]]
([TIME[2021-03-17T06:50:38.000Z]])
<https://github.com/w3c/web-share/pull/134>

[24] [CITE@en[1144920 - Web Share (navigator.Share) integration with Mac - chromium]], [TIME[2021-06-23T00:45:29.000Z]] <https://bugs.chromium.org/p/chromium/issues/detail?id=1144920>

[26] [CITE@en[1312422 - DOM implementation of Web Share API]], [TIME[2021-06-23T00:50:34.000Z]] <https://bugzilla.mozilla.org/show_bug.cgi?id=1312422>

[27] [CITE@en[1613292 - Web share impl is using a localized string for a web-visible exception]], [TIME[2021-06-23T00:51:26.000Z]] <https://bugzilla.mozilla.org/show_bug.cgi?id=1613292>
