-
Notifications
You must be signed in to change notification settings - Fork 4
/
273.txt
122 lines (85 loc) · 4.81 KB
/
273.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
* 仕様書
[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]]
* 歴史
[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>