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:

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

  4. If {{[[sharePromise]]}} is not `null`, return a promise rejected with {{InvalidStateError}}.
  5. -
  6. , return a promise rejected with a {{TypeError}}. -
  7. Let |base:URL| be the [=this=] value's relevant settings object's [=environment settings object/api base URL=].