@@ -2824,6 +2824,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
2824
2824
<li><dfn data-x-href="https://tc39.es/ecma262/#sec-candidate-executions">candidate execution</dfn></li>
2825
2825
<li>The <dfn data-x-href="https://tc39.es/ecma262/#current-realm">current Realm Record</dfn></li>
2826
2826
<li><dfn data-x-href="https://tc39.es/ecma262/#early-error-rule">early error</dfn></li>
2827
+ <li><dfn data-x-href="https://tc39.es/ecma262/#sec-forward-progress">forward progress</dfn></li>
2827
2828
<li><dfn data-x-href="https://tc39.es/ecma262/#sec-invariants-of-the-essential-internal-methods">invariants of the essential internal methods</dfn></li>
2828
2829
<li><dfn data-x-href="https://tc39.es/ecma262/#sec-execution-contexts">JavaScript execution context</dfn></li>
2829
2830
<li><dfn data-x-href="https://tc39.es/ecma262/#execution-context-stack">JavaScript execution context stack</dfn></li>
@@ -88916,40 +88917,31 @@ dictionary <dfn>PromiseRejectionEventInit</dfn> : <span>EventInit</span> {
88916
88917
88917
88918
</div>
88918
88919
88919
- <h4>Event loops</h4> <!-- <dfn>event loop</dfn> -->
88920
+ <h4>Event loops</h4>
88920
88921
88921
88922
<h5 w-nodev>Definitions</h5>
88922
88923
88923
88924
<p>To coordinate events, user interaction, scripts, rendering, networking, and so forth, user
88924
88925
agents must use <dfn data-x="event loop" data-lt="event loop" data-export="">event loops</dfn> as
88925
- described in this section. Each <span>agent</span> has an associated <span>event loop</span>.</p>
88926
+ described in this section. Each <span>agent</span> has an associated <span>event loop</span>,
88927
+ which is unique to that agent.</p>
88926
88928
88927
- <p class="note">In the future, this standard hopes to define exactly when <span data-x="event
88928
- loop">event loops</span> can be created or reused.</p>
88929
+ <p>The <span>event loop</span> of a <span>similar-origin window agent</span> is known as a
88930
+ <dfn>window event loop</dfn>. The <span>event loop</span> of a <span>dedicated worker
88931
+ agent</span>, <span>shared worker agent</span>, or <span>service worker agent</span> is known as a
88932
+ <dfn>worker event loop</dfn>. And the <span>event loop</span> of a <span>worklet agent</span> is
88933
+ known as a <dfn>worklet event loop</dfn>.</p>
88929
88934
88930
- <p>A <dfn>window event loop</dfn> is the <span>event loop</span> used by <span
88931
- data-x="similar-origin window agent">similar-origin window agents</span>. User agents may share an
88932
- <span>event loop</span> across <span data-x="similar-origin window agent">similar-origin window
88933
- agents</span>.</p>
88934
- <!-- Ideally user agents process-isolate similar-origin window agents from each other that are not
88935
- same site. However, this is not the reality in 2019. -->
88936
-
88937
- <p class="note">This specification does not currently describe how to handle the complications
88938
- arising from <span data-x="navigate">navigating</span> between <span data-x="similar-origin window
88939
- agent">similar-origin window agents</span>. E.g., when a <span>browsing context</span> <span
88940
- data-x="navigate">navigates</span> from <code data-x="">https://example.com/</code> to <code
88941
- data-x="">https://shop.example/</code>.</p>
88942
-
88943
- <p>A <dfn>worker event loop</dfn> is the <span>event loop</span> used by <span data-x="dedicated
88944
- worker agent">dedicated worker agents</span>, <span data-x="shared worker agent">shared worker
88945
- agents</span>, and <span data-x="service worker agent">service worker agents</span>. There must be
88946
- one <span>worker event loop</span> per such <span>agent</span>.</p>
88947
-
88948
- <p>A <dfn>worklet event loop</dfn> is the <span>event loop</span> used by <span data-x="worklet
88949
- agent">worklet agents</span>.</p>
88935
+ <div class="note">
88936
+ <p><span data-x="event loop">Event loops</span> do not necessarily correspond to implementation
88937
+ threads. For example, multiple <span data-x="window event loop">window event loops</span> could
88938
+ be cooperatively scheduled in a single thread.</p>
88950
88939
88951
- <p class="XXX">As detailed in <a href="https://github.com/whatwg/html/issues/4213">issue #4213</a>
88952
- the situation for worklets is more complicated.</p>
88940
+ <p>However, because the various worker <span data-x="agent">agents</span> are allocated with
88941
+ [[CanBlock]] set to true, the JavaScript specification does place requirements on them regarding
88942
+ <span>forward progress</span>, which effectively amount to requiring dedicated per-agent threads
88943
+ in those cases.</p>
88944
+ </div>
88953
88945
88954
88946
<div w-nodev>
88955
88947
@@ -89386,8 +89378,8 @@ dictionary <dfn>PromiseRejectionEventInit</dfn> : <span>EventInit</span> {
89386
89378
</li>
89387
89379
89388
89380
<li>
89389
- <p>Report the duration of the <span>update the rendering </span> step by performing the
89390
- following steps:</p>
89381
+ <p>If this a <span>window event loop </span>, then report the duration of the <span>update the
89382
+ rendering</span> step by performing the following steps:</p>
89391
89383
89392
89384
<ol>
89393
89385
<li><p>Let <var>rendering end time</var> be the <span>current high resolution
0 commit comments