Skip to content
Permalink
Browse files

[giow] (0) Fix my bogus maths.

Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=13671

git-svn-id: http://svn.whatwg.org/webapps@6383 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed Aug 6, 2011
1 parent 533a19f commit 1d17d54396d210254a33dd0525c696a192e03621
Showing with 36 additions and 34 deletions.
  1. +12 −11 complete.html
  2. +12 −11 index
  3. +12 −12 source
<li><p>Let <var title="">n</var> be <var title="">index</var> minus
<var title="">length</var>.</li>

<li><p>If <var title="">n</var> is greater than one, then append
<var title="">n</var> new <code><a href=#the-option-element>option</a></code> elements with no
attributes and no child nodes to the <code><a href=#the-select-element>select</a></code> element on
which the <code><a href=#htmloptionscollection>HTMLOptionsCollection</a></code> is rooted. Mutation
events must be fired as if a <code><a href=#documentfragment>DocumentFragment</a></code>
containing the new <code><a href=#the-option-element>option</a></code> elements had been
inserted.</li>

<li><p>If <var title="">n</var> is zero, append <var title="">value</var> to the <code><a href=#the-select-element>select</a></code> element. Otherwise,
replace the <var title="">index</var>th element in the collection
by <var title="">value</var>.</li>
<li><p>If <var title="">n</var> is greater than zero, then append
<span title=""><var title="">n</var>-1</span> new
<code><a href=#the-option-element>option</a></code> elements with no attributes and no child nodes
to the <code><a href=#the-select-element>select</a></code> element on which the
<code><a href=#htmloptionscollection>HTMLOptionsCollection</a></code> is rooted. Mutation events must
be fired as if a <code><a href=#documentfragment>DocumentFragment</a></code> containing the new
<code><a href=#the-option-element>option</a></code> elements had been inserted.</li>

<li><p>If <var title="">n</var> is greater than or equal to zero,
append <var title="">value</var> to the <code><a href=#the-select-element>select</a></code>
element. Otherwise, replace the <var title="">index</var>th element
in the collection by <var title="">value</var>.</li>

</ol><p>The <dfn id=dom-htmloptionscollection-add title=dom-HTMLOptionsCollection-add><code>add(<var title="">element</var>, <var title="">before</var>)</code></dfn>
method must act according to the following algorithm:</p>
23 index
<li><p>Let <var title="">n</var> be <var title="">index</var> minus
<var title="">length</var>.</li>

<li><p>If <var title="">n</var> is greater than one, then append
<var title="">n</var> new <code><a href=#the-option-element>option</a></code> elements with no
attributes and no child nodes to the <code><a href=#the-select-element>select</a></code> element on
which the <code><a href=#htmloptionscollection>HTMLOptionsCollection</a></code> is rooted. Mutation
events must be fired as if a <code><a href=#documentfragment>DocumentFragment</a></code>
containing the new <code><a href=#the-option-element>option</a></code> elements had been
inserted.</li>

<li><p>If <var title="">n</var> is zero, append <var title="">value</var> to the <code><a href=#the-select-element>select</a></code> element. Otherwise,
replace the <var title="">index</var>th element in the collection
by <var title="">value</var>.</li>
<li><p>If <var title="">n</var> is greater than zero, then append
<span title=""><var title="">n</var>-1</span> new
<code><a href=#the-option-element>option</a></code> elements with no attributes and no child nodes
to the <code><a href=#the-select-element>select</a></code> element on which the
<code><a href=#htmloptionscollection>HTMLOptionsCollection</a></code> is rooted. Mutation events must
be fired as if a <code><a href=#documentfragment>DocumentFragment</a></code> containing the new
<code><a href=#the-option-element>option</a></code> elements had been inserted.</li>

<li><p>If <var title="">n</var> is greater than or equal to zero,
append <var title="">value</var> to the <code><a href=#the-select-element>select</a></code>
element. Otherwise, replace the <var title="">index</var>th element
in the collection by <var title="">value</var>.</li>

</ol><p>The <dfn id=dom-htmloptionscollection-add title=dom-HTMLOptionsCollection-add><code>add(<var title="">element</var>, <var title="">before</var>)</code></dfn>
method must act according to the following algorithm:</p>
24 source
@@ -8252,18 +8252,18 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E..
<li><p>Let <var title="">n</var> be <var title="">index</var> minus
<var title="">length</var>.</p></li>

<li><p>If <var title="">n</var> is greater than one, then append
<var title="">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>

<li><p>If <var title="">n</var> is zero, append <var
title="">value</var> to the <code>select</code> element. Otherwise,
replace the <var title="">index</var>th element in the collection
by <var title="">value</var>.</p></li>
<li><p>If <var title="">n</var> is greater than zero, then append
<span title=""><var title="">n</var>-1</span> 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>

<li><p>If <var title="">n</var> is greater than or equal to zero,
append <var title="">value</var> to the <code>select</code>
element. Otherwise, replace the <var title="">index</var>th element
in the collection by <var title="">value</var>.</p></li>

</ol>

0 comments on commit 1d17d54

Please sign in to comment.
You can’t perform that action at this time.