[html5] r7285 - [e] (0) Clarify what 'replace' means for a node. Fixing https://www.w3.org/Bugs/ [...]

whatwg at whatwg.org whatwg at whatwg.org
Mon Aug 27 14:50:58 PDT 2012


Author: ianh
Date: 2012-08-27 14:50:57 -0700 (Mon, 27 Aug 2012)
New Revision: 7285

Modified:
   complete.html
   index
   source
Log:
[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

Modified: complete.html
===================================================================
--- complete.html	2012-08-27 20:04:00 UTC (rev 7284)
+++ complete.html	2012-08-27 21:50:57 UTC (rev 7285)
@@ -4102,7 +4102,7 @@
      <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 @@
    <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>

Modified: index
===================================================================
--- index	2012-08-27 20:04:00 UTC (rev 7284)
+++ index	2012-08-27 21:50:57 UTC (rev 7285)
@@ -4102,7 +4102,7 @@
      <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 @@
    <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>

Modified: source
===================================================================
--- source	2012-08-27 20:04:00 UTC (rev 7284)
+++ source	2012-08-27 21:50:57 UTC (rev 7285)
@@ -3034,7 +3034,7 @@
      <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 @@
    <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>
 




More information about the Commit-Watchers mailing list