Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: default share(data) to empty dictionary #111

Merged
merged 2 commits into from
Jul 8, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,9 @@ <h3>
</h3>
<pre class="idl">
partial interface Navigator {
[SecureContext] Promise&lt;void&gt; share(optional ShareData data);
[SecureContext] Promise&lt;void&gt; share(optional ShareData data = {});
};
</pre>
<div class="note">
The <var>data</var> argument is marked as "optional", but it is
effectively required; <a>share()</a> will return a rejected promise
with a {{TypeError}} if called with no arguments. WebIDL
<a data-cite="WEBIDL#idl-operations">mandates that it be optional</a>
because the dictionary members are all optional. See WebIDL <a href=
"https://github.com/heycam/webidl/issues/130">Issue #130</a>.
</div>
<p>
User agents that do not support sharing SHOULD NOT expose
<a>share()</a> on the <a>Navigator</a> interface.
Expand Down