Skip to content

Add canShare() method #177

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

Merged
merged 19 commits into from
Aug 20, 2021
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
add SecureContext and allowed to use check
  • Loading branch information
marcoscaceres committed Oct 28, 2020
commit a130e8dfb4a2ceacc55fbefdc60e8b450c3f953c
6 changes: 5 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@

partial interface Navigator {
boolean canShare(optional ShareData data = {});
[SecureContext] boolean canShare(optional ShareData data = {});
[SecureContext] Promise<undefined> share(optional ShareData data = {});
};
Expand Down Expand Up @@ -146,6 +146,10 @@

|data:ShareData|, run the following steps:

  1. If the current settings object's responsible document is not
  2. allowed to use the "[=web-share-feature|web-share=]"
    permission, return false.
  3. Let |base| be [=this=]'s [=relevant settings object=]'s
  4. [=environment settings object/API base URL=].
    Expand Down