From f01a2d0895285e0daae97858e3b27bc1436c8e54 Mon Sep 17 00:00:00 2001 From: Eric Willigers Date: Thu, 24 Sep 2020 12:26:54 +1000 Subject: [PATCH] Check transient activation after sharePromise WPT web-share/share-sharePromise-internal-slot.https.html has multiple navigator.share() calls within a single onclick handler. This is a good way to test the sharePromise internal slot, but it was not previously permitted by the spec, as the first call would consume activation and the later calls would fail with NotAllowedError instead of InvalidStateError. --- index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index bfa443f..ac3a04d 100644 --- a/index.html +++ b/index.html @@ -150,6 +150,9 @@

permission, return [=a promise rejected with=] with a {{"NotAllowedError"}} {{DOMException}}. +
  • If {{[[sharePromise]]}} is not `null`, return a promise + rejected with {{InvalidStateError}}. +
  • Let |window| be [=relevant global object=] of [=this=].
  • If |window| does not have [=transient activation=], return [=a @@ -158,9 +161,6 @@

  • [=Consume user activation=] of |window|.
  • -
  • If {{[[sharePromise]]}} is not `null`, return a promise - rejected with {{InvalidStateError}}. -
  • If none of |data|'s members {{ShareData/title}}, {{ShareData/text}}, or {{ShareData/url}} or {{ShareData/file}} are present, return a promise rejected with a {{TypeError}}.