Skip to content

Commit

Permalink
Do the same for DedicatedWorkerGlobalScope (the other side)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Nov 5, 2024
1 parent 128d91d commit b1aba94
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -119752,13 +119752,10 @@ interface <dfn interface>DedicatedWorkerGlobalScope</dfn> : <span>WorkerGlobalSc

<span>DedicatedWorkerGlobalScope</span> includes <span>MessageEventTarget</span>;</code></pre>

<p><code>DedicatedWorkerGlobalScope</code> objects act as if they had an implicit
<code>MessagePort</code> associated with them. This port is part of a channel that is set up when
the worker is created, but it is not exposed.<span w-nodev> This object must never be garbage
collected before the <code>DedicatedWorkerGlobalScope</code> object.</span></p>

<p w-nodev>All messages received by that port must immediately be retargeted at the
<code>DedicatedWorkerGlobalScope</code> object.</p>
<p><code>DedicatedWorkerGlobalScope</code> objects has an associated <dfn>inside port</dfn> (a
<code>MessagePort</code>). This port is part of a channel that is set up when the worker is
created, but it is not exposed.<span w-nodev> This object must never be garbage collected before
the <code>DedicatedWorkerGlobalScope</code> object.</span></p>

<dl class="domintro">
<dt><code data-x=""><var>dedicatedWorkerGlobal</var>.<span subdfn data-x="dom-DedicatedWorkerGlobalScope-name">name</span></code></dt>
Expand Down Expand Up @@ -120170,7 +120167,17 @@ interface <dfn interface>SharedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope
<var>inside settings</var>'s <span data-x="environment settings object's
realm">realm</span>.</p></li>

<li><p>Associate <var>inside port</var> with <var>worker global scope</var>.</p></li>
<li>
<p>If <var>shared</var> is false, then:</p>

<ol>
<li><p>Set <var>inside port</var>'s <span>message event target</span> to <var>worker global
scope</var>.</p></li>

<li><p>Set <var>worker global scope</var>'s <span>inside port</span> to <var>inside
port</var>.</p></li>
</ol>
</li>

<li><p><span>Entangle</span> <var>outside port</var> and <var>inside port</var>.</p></li>

Expand Down

0 comments on commit b1aba94

Please sign in to comment.