Skip to content

Commit

Permalink
Remove the queueing behavior, and always destroy the document when it…
Browse files Browse the repository at this point in the history
…'s not eligible for messaging
  • Loading branch information
lozy219 committed Feb 28, 2025
1 parent 6208595 commit 4c1f888
Showing 1 changed file with 4 additions and 29 deletions.
33 changes: 4 additions & 29 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -99976,22 +99976,6 @@ location.href = '#foo';</code></pre>
data-x="window-navigation-api">navigation API</span>, <var>entriesForNavigationAPI</var>, and
<var>reactivatedEntry</var>.</p></li>

<li><p>Let <var>window</var> be the <code>Window</code> whose <span data-x="concept-document-window">
associated <code>Document</code></span> is <var>document</var>.</p></li>

<li><p>Let <var>channels</var> be a list of <code>BroadcastChannel</code> objects whose
<span>relevant global object</span> is <var>window</var>.</p></li>

<li><p>Sort <var>channels</var> by the creation order, oldest first.</p></li>

<li><p>For each <var>channel</var> in <var>channels</var>:</p>
<ul>
<li><p>For each string <var>serialized</var> from <var>channel</var>'s <span>message queue</span>,
<span data-x="dom-BroadcastChannel-post-a-message">post a message</span> with <var>serialized</var>
to <var>channel</var>.</p></li>
</ul>
</li>

<li>
<p>If <var>document</var>'s <span>current document readiness</span> is "<code
data-x="">complete</code>", and <var>document</var>'s <span>page showing</span> flag is false,
Expand Down Expand Up @@ -113712,9 +113696,8 @@ interface <dfn interface>BroadcastChannel</dfn> : <span>EventTarget</span> {

<div w-nodev>

<p>A <code>BroadcastChannel</code> object has a <dfn>channel name</dfn>, a
<dfn data-x="concept-BroadcastChannel-closed">closed flag</dfn> and an initially empty <span>queue</span>
<dfn>message queue</dfn>.
<p>A <code>BroadcastChannel</code> object has a <dfn>channel name</dfn> and a <dfn
data-x="concept-BroadcastChannel-closed">closed flag</dfn>.</p>

<p>The <dfn><code data-x="dom-BroadcastChannel">new BroadcastChannel(<var>name</var>)</code></dfn>
constructor steps are:</p>
Expand Down Expand Up @@ -113816,16 +113799,8 @@ interface <dfn interface>BroadcastChannel</dfn> : <span>EventTarget</span> {
<ul>
<li>
<p>If <var>destination</var>'s <span>relevant global object</span> is a <code>Window</code>
<var>window</var>, <span>enqueue</span> <var>serialized</var> on <span>message queue</span>.</p>
</li>

<li>
<p>If the <span data-x="list size">size</span> of <var>destination</var>'s <span>message queue</span>
is above a certain threshold, the user agent may <span data-x="destroy a document">destroy</span>
<var>window</var>'s <span data-x="concept-document-window">associated <code>Document</code></span>.</p>

<p class="note">The user agents can set their own threshold (possibly 0) to trigger the
<code>Document</code> destruction.</p>
<var>window</var>, <span data-x="destroy a document">destroy</span> <var>window</var>'s
<span data-x="concept-document-window">associated <code>Document</code></span>.</p>

<p class="note">The <code>Document</code> to be destroyed here is not <span>fully active</span>
(either detached or in <a href="#note-bfcache">bfcache</a>).</p>
Expand Down

0 comments on commit 4c1f888

Please sign in to comment.