Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[e] (0) Clarify what 'replace' means for a node.

Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=18504
Affected topics: DOM APIs

git-svn-id: http://svn.whatwg.org/webapps@7285 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
commit e894bd2e166bcaf029a3a6607a03db09eace8930 1 parent 208a94e
ianh authored
Showing with 26 additions and 33 deletions.
  1. +7 −11 complete.html
  2. +7 −11 index
  3. +12 −11 source
View
18 complete.html
@@ -4102,7 +4102,7 @@ <h4 id=dependencies><span class=secno>2.2.2 </span>Dependencies</h4>
<li><dfn id=dom-element-id title=dom-Element-id><code>id</code></dfn> attribute</li>
<li><dfn id=textcontent><code>textContent</code></dfn> attribute</li>
- <li>The <dfn id=concept-node-insert title=concept-node-insert>insert</dfn> algorithm for nodes</li>
+ <li>The <dfn id=concept-node-insert title=concept-node-insert>insert</dfn>, <dfn id=concept-node-append title=concept-node-append>append</dfn>, and <dfn id=concept-node-replace title=concept-node-replace>replace</dfn> algorithms for nodes</li>
<li><dfn id=event><code>Event</code></dfn> interface</li>
<li><dfn id=eventtarget><code>EventTarget</code></dfn> interface</li>
@@ -9457,18 +9457,14 @@ <h5 id=htmloptionscollection-0><span class=secno>2.8.2.3 </span>HTMLOptionsColle
<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 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 zero, then <a href=#concept-node-append title=concept-node-append>append</a> a
+ <code><a href=#documentfragment>DocumentFragment</a></code> consisting of <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.</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>
+ <a href=#concept-node-append title=concept-node-append>append</a> <var title="">value</var> to the <code><a href=#the-select-element>select</a></code> element. Otherwise,
+ <a href=#concept-node-replace title=concept-node-replace>replace</a> 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>
View
18 index
@@ -4102,7 +4102,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<li><dfn id=dom-element-id title=dom-Element-id><code>id</code></dfn> attribute</li>
<li><dfn id=textcontent><code>textContent</code></dfn> attribute</li>
- <li>The <dfn id=concept-node-insert title=concept-node-insert>insert</dfn> algorithm for nodes</li>
+ <li>The <dfn id=concept-node-insert title=concept-node-insert>insert</dfn>, <dfn id=concept-node-append title=concept-node-append>append</dfn>, and <dfn id=concept-node-replace title=concept-node-replace>replace</dfn> algorithms for nodes</li>
<li><dfn id=event><code>Event</code></dfn> interface</li>
<li><dfn id=eventtarget><code>EventTarget</code></dfn> interface</li>
@@ -9457,18 +9457,14 @@ 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>.</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 zero, then <a href=#concept-node-append title=concept-node-append>append</a> a
+ <code><a href=#documentfragment>DocumentFragment</a></code> consisting of <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.</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>
+ <a href=#concept-node-append title=concept-node-append>append</a> <var title="">value</var> to the <code><a href=#the-select-element>select</a></code> element. Otherwise,
+ <a href=#concept-node-replace title=concept-node-replace>replace</a> 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>
View
23 source
@@ -3034,7 +3034,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<li><dfn title="dom-Element-id"><code>id</code></dfn> attribute</li>
<li><dfn><code>textContent</code></dfn> attribute</li>
- <li>The <dfn title="concept-node-insert">insert</dfn> algorithm for nodes</li>
+ <li>The <dfn title="concept-node-insert">insert</dfn>, <dfn title="concept-node-append">append</dfn>, and <dfn title="concept-node-replace">replace</dfn> algorithms for nodes</li>
<li><dfn><code>Event</code></dfn> interface</li>
<li><dfn><code>EventTarget</code></dfn> interface</li>
@@ -9544,18 +9544,19 @@ 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 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 zero, then <span
+ title="concept-node-append">append</span> a
+ <code>DocumentFragment</code> consisting of <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.</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>
+ <span title="concept-node-append">append</span> <var
+ title="">value</var> to the <code>select</code> element. Otherwise,
+ <span title="concept-node-replace">replace</span> the <var
+ title="">index</var>th element in the collection by <var
+ title="">value</var>.</p></li>
</ol>
Please sign in to comment.
Something went wrong with that request. Please try again.