Skip to content

Commit

Permalink
Editorial: address Proposed Rec feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoscaceres committed Dec 12, 2022
1 parent d5cf6ac commit bee2344
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ <h3>
text: "This is a text to share",
someFutureThing: "some future thing",
};

// Things that are not supported...
const unsupported = Object.entries(data).filter(([key, value]) =&gt; {
return !navigator.canShare({ [key]: value });
Expand All @@ -200,8 +200,8 @@ <h3>
Enabling the API in third-party contexts
</h3>
<p data-cite="permissions-policy">
The [=default allowlist=] of `'self'` makes Web Share API available by
default only in first-party contexts.
The [=default allowlist=] of [=default allowlist/'self'=] makes Web
Share API available by default only in first-party contexts.
</p>
<p>
Third-party can be allowed to use this API via an [^iframe^]'s
Expand Down Expand Up @@ -680,20 +680,28 @@ <h2>
<p>
This specification defines a policy-controlled permission identified by
the string <code><dfn class="permission">"web-share"</dfn></code>. Its
<a>default allowlist</a> is [=default allowlist/'self'=].
[=default allowlist=] is [=default allowlist/'self'=], which means
third-party contexts are not [=allowed to use=] the API by default.
</p>
<p>
Developers can use the means afforded by the [[[permissions-policy]]]
specification to control if and when a third-party context is [=allowed
to use=] this API.
</p>
<div class="note">
<aside class="note" title="Permissions Policy Implementation Status">
<p>
A <a>document</a>'s permission policy determines whether a
{{Navigator/share()}} call immediately rejects with a
{{"NotAllowedError"}} {{DOMException}}.
Although user agents are unified in preventing the Web Share API from
being used in third-party context, at the time of publication there
are interoperability with relying on the [[[Permissions-Policy]]] to
enable the API in third-party contexts. In particular, although
the[^iframe/allow^] attribute is widely supported, the updated syntax
for the [^iframe/allow^] attribute is not. Similarly, the
`Permissions-Policy:` HTTP header is not yet widely supported.
Developers are advised to check the implementation status of the
[[[Permissions-Policy]]] specification before relying on it to enable
the Web Share API in third-party contexts.
</p>
</div>
</aside>
</section>
<section class="informative">
<h2>
Expand Down

0 comments on commit bee2344

Please sign in to comment.