Skip to content

Commit 151b35e

Browse files
Check transient activation after sharePromise (#183)
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. Co-authored-by: Eric Willigers <[email protected]>
1 parent 2bbde9c commit 151b35e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ <h4>
150150
permission, return [=a promise rejected with=] with a
151151
{{"NotAllowedError"}} {{DOMException}}.
152152
</li>
153+
<li>If {{[[sharePromise]]}} is not `null`, return <a>a promise
154+
rejected with</a> {{InvalidStateError}}.
155+
</li>
153156
<li>Let |window| be [=relevant global object=] of [=this=].
154157
</li>
155158
<li>If |window| does not have [=transient activation=], return [=a
@@ -158,9 +161,6 @@ <h4>
158161
</li>
159162
<li>[=Consume user activation=] of |window|.
160163
</li>
161-
<li>If {{[[sharePromise]]}} is not `null`, return <a>a promise
162-
rejected with</a> {{InvalidStateError}}.
163-
</li>
164164
<li>If none of |data|'s members {{ShareData/title}},
165165
{{ShareData/text}}, or {{ShareData/url}} or {{ShareData/file}} are
166166
present, return <a>a promise rejected with</a> a {{TypeError}}.

0 commit comments

Comments
 (0)