|
77 | 77 | more available across all OSs over time, and is already widely
|
78 | 78 | available on popular OSs across a range of devices.
|
79 | 79 | p>
|
| 80 | + <p> |
| 81 | + |
| 82 | + Future updates to this Recommendation may incorporate [new |
| 83 | + features](https://www.w3.org/2021/Process-20211102/#allow-new-features). |
| 84 | + p> |
80 | 85 | section>
|
81 | 86 | section>
|
82 | 87 | <section class="informative">
|
|
190 | 195 | text: "This is a text to share",
|
191 | 196 | someFutureThing: "some future thing",
|
192 | 197 | };
|
193 |
| - |
| 198 | + |
194 | 199 | // Things that are not supported...
|
195 | 200 | const unsupported = Object.entries(data).filter(([key, value]) => {
|
196 | 201 | return !navigator.canShare({ [key]: value });
|
|
200 | 205 | Enabling the API in third-party contexts
|
201 | 206 | h3>
|
202 | 207 | <p data-cite="permissions-policy">
|
203 |
| - The [=default allowlist=] of `'self'` makes Web Share API available by |
204 |
| - default only in first-party contexts. |
| 208 | + The [=default allowlist=] of [=default allowlist/'self'=] makes Web |
| 209 | + Share API available by default only in first-party contexts. |
205 | 210 | p>
|
206 | 211 | <p>
|
207 | 212 | Third-party can be allowed to use this API via an [^iframe^]'s
|
|
680 | 685 | <p>
|
681 | 686 | This specification defines a policy-controlled permission identified by
|
682 | 687 | the string <code><dfn class="permission">"web-share"dfn>code>. Its
|
683 |
| - <a>default allowlista> is [=default allowlist/'self'=]. |
| 688 | + [=default allowlist=] is [=default allowlist/'self'=], which means |
| 689 | + third-party contexts are not [=allowed to use=] the API by default. |
684 | 690 | p>
|
685 | 691 | <p>
|
686 | 692 | Developers can use the means afforded by the [[[permissions-policy]]]
|
687 | 693 | specification to control if and when a third-party context is [=allowed
|
688 | 694 | to use=] this API.
|
689 | 695 | p>
|
690 |
| - <div class="note"> |
| 696 | + <aside class="note" title="Permissions Policy Implementation Status"> |
691 | 697 | <p>
|
692 |
| - A <a>documenta>'s permission policy determines whether a |
693 |
| - {{Navigator/share()}} call immediately rejects with a |
694 |
| - {{"NotAllowedError"}} {{DOMException}}. |
| 698 | + Although user agents are unified in preventing the Web Share API from |
| 699 | + being used in third-party context, at the time of publication there |
| 700 | + are interoperability with relying on the [[[Permissions-Policy]]] to |
| 701 | + enable the API in third-party contexts. In particular, although |
| 702 | + the[^iframe/allow^] attribute is widely supported, the updated syntax |
| 703 | + for the [^iframe/allow^] attribute is not. Similarly, the |
| 704 | + `Permissions-Policy:` HTTP header is not yet widely supported. |
| 705 | + Developers are advised to check the implementation status of the |
| 706 | + [[[Permissions-Policy]]] specification before relying on it to enable |
| 707 | + the Web Share API in third-party contexts. |
695 | 708 | p>
|
696 |
| - div> |
| 709 | + aside> |
697 | 710 | section>
|
698 | 711 | <section class="informative">
|
699 | 712 | <h2>
|
|
0 commit comments