@@ -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>
@@ -88912,40 +88913,31 @@ dictionary <dfn>PromiseRejectionEventInit</dfn> : <span>EventInit</span> {
88912
88913
88913
88914
</div>
88914
88915
88915
- <h4>Event loops</h4> <!-- <dfn>event loop</dfn> -->
88916
+ <h4>Event loops</h4>
88916
88917
88917
88918
<h5 w-nodev>Definitions</h5>
88918
88919
88919
88920
<p>To coordinate events, user interaction, scripts, rendering, networking, and so forth, user
88920
88921
agents must use <dfn data-x="event loop" data-lt="event loop" data-export="">event loops</dfn> as
88921
- described in this section. Each <span>agent</span> has an associated <span>event loop</span>.</p>
88922
-
88923
- <p class="note">In the future, this standard hopes to define exactly when <span data-x="event
88924
- loop">event loops</span> can be created or reused.</p>
88925
-
88926
- <p>A <dfn>window event loop</dfn> is the <span>event loop</span> used by <span
88927
- data-x="similar-origin window agent">similar-origin window agents</span>. User agents may share an
88928
- <span>event loop</span> across <span data-x="similar-origin window agent">similar-origin window
88929
- agents</span>.</p>
88930
- <!-- Ideally user agents process-isolate similar-origin window agents from each other that are not
88931
- same site. However, this is not the reality in 2019. -->
88932
-
88933
- <p class="note">This specification does not currently describe how to handle the complications
88934
- arising from <span data-x="navigate">navigating</span> between <span data-x="similar-origin window
88935
- agent">similar-origin window agents</span>. E.g., when a <span>browsing context</span> <span
88936
- data-x="navigate">navigates</span> from <code data-x="">https://example.com/</code> to <code
88937
- data-x="">https://shop.example/</code>.</p>
88938
-
88939
- <p>A <dfn>worker event loop</dfn> is the <span>event loop</span> used by <span data-x="dedicated
88940
- worker agent">dedicated worker agents</span>, <span data-x="shared worker agent">shared worker
88941
- agents</span>, and <span data-x="service worker agent">service worker agents</span>. There must be
88942
- one <span>worker event loop</span> per such <span>agent</span>.</p>
88943
-
88944
- <p>A <dfn>worklet event loop</dfn> is the <span>event loop</span> used by <span data-x="worklet
88945
- agent">worklet agents</span>.</p>
88946
-
88947
- <p class="XXX">As detailed in <a href="https://github.com/whatwg/html/issues/4213">issue #4213</a>
88948
- the situation for worklets is more complicated.</p>
88922
+ described in this section. Each <span>agent</span> has an associated <span>event loop</span>,
88923
+ which is unique to that agent.</p>
88924
+
88925
+ <p>The <span>event loop</span> of a <span>similar-origin window agent</span> is known as a
88926
+ <dfn>window event loop</dfn>. The <span>event loop</span> of a <span>dedicated worker
88927
+ agent</span>, <span>shared worker agent</span>, or <span>service worker agent</span> is known as a
88928
+ <dfn>worker event loop</dfn>. And the <span>event loop</span> of a <span>worklet agent</span> is
88929
+ known as a <dfn>worklet event loop</dfn>.</p>
88930
+
88931
+ <div class="note">
88932
+ <p><span data-x="event loop">Event loops</span> do not necessarily correspond to implementation
88933
+ threads. For example, multiple <span data-x="window event loop">window event loops</span> could
88934
+ be cooperatively scheduled in a single thread.</p>
88935
+
88936
+ <p>However, because the various worker <span data-x="agent">agents</span> are allocated with
88937
+ [[CanBlock]] set to true, the JavaScript specification does place requirements on them regarding
88938
+ <span>forward progress</span>, which effectively amount to requiring dedicated per-agent threads
88939
+ in those cases.</p>
88940
+ </div>
88949
88941
88950
88942
<div w-nodev>
88951
88943
0 commit comments