Skip to content

Commit

Permalink
Run more updates on insertion and removal
Browse files Browse the repository at this point in the history
  • Loading branch information
josepharhar committed Dec 20, 2024
1 parent 4a175ce commit 730b52f
Showing 1 changed file with 57 additions and 3 deletions.
60 changes: 57 additions & 3 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -56345,10 +56345,10 @@ interface <dfn interface>HTMLSelectedContentElement</dfn> : <span>HTMLElement</s
any such <code>option</code> exists, otherwise null.</p></li>

<li><p>If <var>option</var> is null, then run <span>clear a <code>selectedcontent</code></span>
given <var>insertedNode</var>.</p></li>
given <var>selectedcontent</var>.</p></li>

<li><p>Otherwise, run <span>clone an option into a <code>selectedcontent</code></span> given
<var>option</var> and <var>insertedNode</var>.</p></li>
<var>option</var> and <var>selectedcontent</var>.</p></li>
</ol>

<p>To <dfn data-x="select-enabled-selectedcontent">get a <code>select</code>'s enabled
Expand Down Expand Up @@ -56407,6 +56407,31 @@ interface <dfn interface>HTMLSelectedContentElement</dfn> : <span>HTMLElement</s
order</span>.</p></li>
</ol>

<p>To <dfn>clear a <code>select</code>'s non-primary <code>selectedcontent</code> elements</dfn>,
given a <code>select</code> element <var>select</var>:</p>

<ol>
<li><p>Let <var>passedFirstSelectedcontent</var> be false.</p></li>

<li>
<p>For each <span>descendant</span> of <var>select</var> in <span>tree order</span>:</p>

<ol>
<li>
<p>If <var>descendant</var> is a <code>selectedcontent</code> element, then:</p>

<ol>
<li><p>If <var>passedFirstSelectedcontent</var> is false, then set
<var>passedFirstSelectedcontent</var> to true.</p></li>

<li><p>Otherwise, run <span>clear a <code>selectedcontent</code></span> given
<var>descendant</var>.</p></li>
</ol>
</li>
</ol>
</li>
</ol>

<p>The <code>selectedcontent</code> <span>HTML element post-connection steps</span>, given
<var>selectedcontent</var>, are:</p>

Expand Down Expand Up @@ -56441,10 +56466,39 @@ interface <dfn interface>HTMLSelectedContentElement</dfn> : <span>HTMLElement</s
</ol>
</li>

<li><p>If <var>nearestSelectAncestor</var> is null, then return.</p></li>
<li><p>If <var>nearestSelectAncestor</var> is null or <var>nearestSelectAncestor</var> has the
<code data-x="attr-select-multiple">multiple</code> attribute, then return.</p></li>

<li><p>Run <span>update a <code>select</code>'s <code>selectedcontent</code></span> given
<var>nearestSelectAncestor</var>.</p></li>

<li><p>Run <span>clear a <code>select</code>'s non-primary <code>selectedcontent</code>
elements</span> given <var>nearestSelectAncestor</var>.</p></li>
</ol>

<p>The <code>selectedcontent</code> <span>HTML element removing steps</span>, given
<var>selectedcontent</var> and <var>oldParent</var>, are:</p>

<ol>
<li>
<p>For each <var>ancestor</var> of <var>selectedcontent</var>'s <span
data-x="ancestor">ancestors</span> in reverse <span>tree order</span>:</p>

<ol>
<li><p>If <var>ancestor</var> is a <code>select</code> element, then return.</p></li>
</ol>
</li>

<li>
<p>For each <var>ancestor</var> of <var>oldParent</var>'s <span data-x="inclusive
ancestor">inclusive ancestors</span> in reverse <span>tree order</span>:</p>

<ol>
<li><p>If <var>ancestor</var> is a <code>select</code> element, then run <span>update a
<code>select</code>'s <code>selectedcontent</code></span> given <var>ancestor</var> and
return.</p></li>
</ol>
</li>
</ol>


Expand Down

0 comments on commit 730b52f

Please sign in to comment.