Skip to content

Commit

Permalink
Style nits
Browse files Browse the repository at this point in the history
  • Loading branch information
domenic committed Oct 7, 2022
1 parent 001c6c0 commit 2c70ce4
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -8475,36 +8475,36 @@ interface <dfn interface>HTMLOptionsCollection</dfn> : <span>HTMLCollection</spa
<p>The object's <span>supported property indices</span> are as defined for
<code>HTMLCollection</code> objects.</p>

<p>On getting, the <dfn attribute for="HTMLOptionsCollection"><code
data-x="dom-HTMLOptionsCollection-length">length</code></dfn> attribute must return the number of
nodes <span>represented by the collection</span>.</p>
<p>The <dfn attribute for="HTMLOptionsCollection"><code
data-x="dom-HTMLOptionsCollection-length">length</code></dfn> getter steps are to return the
number of nodes <span>represented by the collection</span>.</p>

<p>On setting to a new value <var>value</var>, the user agent must run the following algorithm:</p>
<p>The <code data-x="dom-HTMLOptionsCollection-length">length</code> setter steps are:</p>

<ol>
<li><p>Let <var>current</var> be the number of nodes <span>represented by the
collection</span>.</p></li>

<li>
<p>If <var>value</var> is greater than <var>current</var>, then:</p>
<p>If the given value is greater than <var>current</var>, then:</p>

<ol>
<li><p>If <var>value</var> is greater than 10000, then abort these steps.</p></li>
<li><p>If the given value is greater than 10000, then return.</p></li>

<li><p>Let <var>n</var> be <var>value</var> - <var>current</var>.</p></li>
<li><p>Let <var>n</var> be <var>value</var> &minus; <var>current</var>.</p></li>

<li><p>Append <var>n</var> new <code>option</code> elements with no attributes and no child
nodes to the <code>select</code> element on which the <code>HTMLOptionsCollection</code> is
rooted. Mutation events must be fired as if a <code>DocumentFragment</code> containing the new
<code>option</code> elements had been inserted.</p></li>
nodes to the <code>select</code> element on which <span>this</span> is rooted. Mutation events
must be fired as if a <code>DocumentFragment</code> containing the new <code>option</code>
elements had been inserted.</p></li>
</ol>
</li>

<li>
<p>If <var>value</var> is less than <var>current</var>, then:</p>
<p>If the given value is less than <var>current</var>, then:</p>

<ol>
<li><p>Let <var>n</var> be <var>current</var> - <var>value</var>.</p></li>
<li><p>Let <var>n</var> be <var>current</var> &minus; <var>value</var>.</p></li>

<li><p>Remove the last <var>n</var> nodes in the collection from their parent nodes.</p></li>
</ol>
Expand Down

0 comments on commit 2c70ce4

Please sign in to comment.