Skip to content

Commit

Permalink
Check if global is Window object
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoscaceres committed Dec 14, 2023
1 parent 9e0769a commit bb5fb01
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -574,15 +574,19 @@ <h3>
The <dfn>subscribe()</dfn> method when invoked MUST run the following steps:
</p>
<ol class="algorithm">
<li>If the [=relevant global object=] of [=this=] does not have [=transient activation=],
return [=a promise rejected with=] with a {{"NotAllowedError"}} {{DOMException}}.
<li>Let |global| be the [=relevant global object=] of [=this=].
</li>
<li>[=Consume user activation=] of [=this=]'s [=relevant global object=].
<li>If |global| is a {{Window}} object:
<ol>
<li>If |global| does not have [=transient activation=], return [=a promise rejected
with=] with a {{"NotAllowedError"}} {{DOMException}}.
</li>
<li>[=Consume user activation=] of |global|.
</li>
</ol>
</li>
<li>Let |promise| be <a>a new promise</a>.
</li>
<li>Let |global| be [=this=]' [=relevant global object=].
</li>
<li>Return |promise| and continue [=in parallel=].
<aside class="note" title="Validation order can vary across user agents">
<p>
Expand Down

0 comments on commit bb5fb01

Please sign in to comment.