@@ -1634,14 +1634,17 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
1634
1634
<p>The following solution suffers from race conditions:</p>
1635
1635
1636
1636
<ol>
1637
- <li><p>Let <var>p</var> be a new promise.</p></li>
1637
+ <li><p>Let <var>p</var> be a new promise created in <span>this</span>'s <span
1638
+ data-x="concept-relevant-realm">relevant realm</span>.</p></li>
1638
1639
1639
1640
<li>
1640
1641
<p>Run the following steps <span>in parallel</span>:</p>
1641
1642
1642
1643
<ol>
1643
1644
<li><p>If <var>nameList</var> <span data-x="list contains">contains</span> <var>name</var>,
1644
- reject <var>p</var> with a <code>TypeError</code> and abort these steps.</p></li>
1645
+ then <span>queue a global task</span> on the <span>DOM manipulation task source</span> given
1646
+ <span>this</span>'s <span>relevant global object</span> to reject <var>p</var> with a
1647
+ <code>TypeError</code>, and abort these steps.</p></li>
1645
1648
1646
1649
<li><p>Do some potentially lengthy work.</p></li>
1647
1650
@@ -1663,14 +1666,17 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
1663
1666
<span>starting a new parallel queue</span>, then:</p>
1664
1667
1665
1668
<ol>
1666
- <li><p>Let <var>p</var> be a new promise.</p></li>
1669
+ <li><p>Let <var>p</var> be a new promise created in <span>this</span>'s <span
1670
+ data-x="concept-relevant-realm">relevant realm</span>.</p></li>
1667
1671
1668
1672
<li>
1669
1673
<p><mark><span>Enqueue the following steps</span> to <var>nameListQueue</var>:</mark></p>
1670
1674
1671
1675
<ol>
1672
1676
<li><p>If <var>nameList</var> <span data-x="list contains">contains</span> <var>name</var>,
1673
- reject <var>p</var> with a <code>TypeError</code> and abort these steps.</p></li>
1677
+ then <span>queue a global task</span> on the <span>DOM manipulation task source</span> given
1678
+ <span>this</span>'s <span>relevant global object</span> to reject <var>p</var> with a
1679
+ <code>TypeError</code>, and abort these steps.</p></li>
1674
1680
1675
1681
<li><p>Do some potentially lengthy work.</p></li>
1676
1682
0 commit comments