Skip to content

Commit bb5fb01

Browse files
committed
Check if global is Window object
1 parent 9e0769a commit bb5fb01

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

index.html

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -574,15 +574,19 @@

574574
The <dfn>subscribe()dfn> method when invoked MUST run the following steps:
575575
p>
576576
<ol class="algorithm">
577-
<li>If the [=relevant global object=] of [=this=] does not have [=transient activation=],
578-
return [=a promise rejected with=] with a {{"NotAllowedError"}} {{DOMException}}.
577+
<li>Let |global| be the [=relevant global object=] of [=this=].
579578
li>
580-
<li>[=Consume user activation=] of [=this=]'s [=relevant global object=].
579+
<li>If |global| is a {{Window}} object:
580+
<ol>
581+
<li>If |global| does not have [=transient activation=], return [=a promise rejected
582+
with=] with a {{"NotAllowedError"}} {{DOMException}}.
583+
li>
584+
<li>[=Consume user activation=] of |global|.
585+
li>
586+
ol>
581587
li>
582588
<li>Let |promise| be <a>a new promisea>.
583589
li>
584-
<li>Let |global| be [=this=]' [=relevant global object=].
585-
li>
586590
<li>Return |promise| and continue [=in parallel=].
587591
<aside class="note" title="Validation order can vary across user agents">
588592
<p>

0 commit comments

Comments
 (0)