From a3a43191aac350964005cf29ac9314acb448b4e4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcos=20C=C3=A1ceres?=
Date: Mon, 21 Sep 2020 17:59:40 +1000
Subject: [PATCH] add SecureContext and allowed to use check
---
index.html | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/index.html b/index.html
index bd656f8..f8981da 100644
--- a/index.html
+++ b/index.html
@@ -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 = {});
};
@@ -146,6 +146,10 @@
|data:ShareData|, run the following steps:
+ - If the current settings object's responsible document is not
+ allowed to use the "[=web-share-feature|web-share=]"
+ permission, return false.
+
- Let |base| be [=this=]'s [=relevant settings object=]'s
[=environment settings object/API base URL=].
@@ -179,8 +183,6 @@
- If {{[[sharePromise]]}} is not `null`, return a promise
rejected with {{InvalidStateError}}.
- - , return a promise rejected with a {{TypeError}}.
-
- Let |base:URL| be the [=this=] value's relevant settings
object's [=environment settings object/api base URL=].