[html5] r2922 - [] (0) Defer to mutation events spec.

whatwg at whatwg.org whatwg at whatwg.org
Mon Mar 30 15:56:07 PDT 2009


Author: ianh
Date: 2009-03-30 15:56:06 -0700 (Mon, 30 Mar 2009)
New Revision: 2922

Modified:
   index
   source
Log:
[] (0) Defer to mutation events spec.

Modified: index
===================================================================
--- index	2009-03-30 01:21:47 UTC (rev 2921)
+++ index	2009-03-30 22:56:06 UTC (rev 2922)
@@ -7113,7 +7113,8 @@
    string if <a href=#the-title-element-0>the <code>title</code> element</a> is
    null.</li>
 
-  </ol><p>On setting, the following algorithm must be run:</p>
+  </ol><p>On setting, the following algorithm must be run. Mutation events
+  must be fired as appropriate.</p>
 
   <ol><li><p>If the <a href=#root-element>root element</a> is an <code>svg</code>
    element in the "<code title="">http://www.w3.org/2000/svg</code>"
@@ -7126,9 +7127,6 @@
    <a href=#the-head-element-0>the <code>head</code> element</a> is null, then the
    attribute must do nothing. Stop the algorithm here.</li>
 
-   <!-- XXX define the following two paragraphs with respect to
-   mutation events (e.g. are mutation events fired synchronously) -->
-
    <li>If <a href=#the-title-element-0>the <code>title</code> element</a> is null, then a
    new <code><a href=#the-title-element>title</a></code> element must be created and appended to
    <a href=#the-head-element-0>the <code>head</code> element</a>.</li>
@@ -8736,12 +8734,8 @@
   (and the <a href=#html-parser>HTML parser</a>) or XHTML in <a href=#xml-documents>XML
   documents</a> (and the <a href=#xml-parser>XML parser</a>).</p>
 
-  <!-- XXX must make sure we spec that innerHTML et al causes mutation
-  events to fire, but document.write() doesn't. (the latter is already
-  req-stated in the parser section, btw) -->
 
 
-
   <h4 id=controlling-the-input-stream><span class=secno>3.7.1 </span>Controlling the input stream</h4>
 
   <p>The <dfn id=dom-document-open title=dom-document-open><code>open()</code></dfn>
@@ -8839,7 +8833,8 @@
    <code>Document</code> node and its descendants.</p>
 
    <li><p>Remove all child nodes of the document, without firing any
-   mutation events.</li>
+   mutation events.</li> <!-- as of 2009-03-30, only WebKit fired
+   mutation events here. -->
 
    <li><p>Replace the <code>Document</code>'s singleton objects with
    new instances of those objects. (This includes in particular the
@@ -9145,7 +9140,8 @@
 
    <li>
 
-    <p>Remove the child nodes of the node whose <code title=dom-innerHTML><a href=#dom-innerhtml>innerHTML</a></code> attribute is being set.</p>
+    <p>Remove the child nodes of the node whose <code title=dom-innerHTML><a href=#dom-innerhtml>innerHTML</a></code> attribute is being set,
+    firing appropriate mutation events.</p>
 
    </li>
 
@@ -9172,8 +9168,8 @@
 
     <p>Append all the <var title="">new children</var> nodes to the
     node whose <code title=dom-innerHTML><a href=#dom-innerhtml>innerHTML</a></code> attribute
-    is being set, preserving their order, without firing any mutation
-    events.</p>
+    is being set, preserving their order, and firing mutation events
+    as appropriate.</p>
 
    </li>
 
@@ -9277,10 +9273,10 @@
 
    <li>
 
-    <p>Remove <var title="">target</var> from its parent node and
-    insert in its place all the <var title="">new children</var>
-    nodes, preserving their order, without firing any mutation
-    events.</p>
+    <p>Remove <var title="">target</var> from its parent node, firing
+    mutation events as appropriate, and then insert in its place all
+    the <var title="">new children</var> nodes, preserving their
+    order, and again firing mutation events as appropriate.</p>
 
    </li>
 
@@ -9417,8 +9413,7 @@
      <dd>
 
       <p>Insert all the <var title="">new children</var> nodes
-      immediately before <var title="">target</var>, preserving their
-      order.</p>
+      immediately before <var title="">target</var>.</p>
 
      </dd>
 
@@ -9428,9 +9423,8 @@
      <dd>
 
       <p>Insert all the <var title="">new children</var> nodes before
-      the first child of <var title="">target</var>, if there is one,
-      preserving their order. If there is no such child, append them
-      all to <var title="">target</var>, preserving their order.</p>
+      the first child of <var title="">target</var>, if there is
+      one. If there is no such child, append them all to <var title="">target</var>.</p>
 
      </dd>
 
@@ -9439,7 +9433,7 @@
 
      <dd>
 
-      <p>Append all the <var title="">new children</var> nodes to <var title="">target</var>, preserving their order.</p>
+      <p>Append all the <var title="">new children</var> nodes to <var title="">target</var>.</p>
 
      </dd>
 
@@ -9449,13 +9443,13 @@
      <dd>
 
       <p>Insert all the <var title="">new children</var> nodes
-      immediately after <var title="">target</var>, preserving their
-      order.</p>
+      immediately after <var title="">target</var>.</p>
 
      </dd>
 
-    </dl><p>The above mutations must be performed without firing any
-    mutation events.</p>
+    </dl><p>The <var title="">new children</var> nodes must be inserted in
+    a manner that preserves their order and fires mutation events as
+    appropriate.</p>
 
    </li>
 
@@ -40410,9 +40404,12 @@
     when an element is <a href=#insert-an-element-into-a-document title="insert an element into a
     document">inserted into the document</a>.</p>
 
-    <p>Asynchronous mutation events must be dispatched using <a href=#concept-task title=concept-task>tasks</a> <a href=#queue-a-task title="queue a
-    task">queued</a> with the <a href=#dom-manipulation-task-source>DOM manipulation task
-    source</a>. <a href=#refsDOMEVENTS>[DOMEVENTS]</a></p>
+    <!--
+    <p>Asynchronous mutation events must be dispatched using <span
+    title="concept-task">tasks</span> <span title="queue a
+    task">queued</span> with the <span>DOM manipulation task
+    source</span>. <a href="#refsDOMEVENTS">[DOMEVENTS]</a></p>
+    -->
 
    </dd>
 
@@ -47721,6 +47718,10 @@
   request to delete the content of <a href=#the-selection-0>the selection</a> followed
   by a request to break the paragraph at that position.</p>
 
+  <p>All of the actions defined above, whether triggered by the user
+  or programmatically (e.g. by <code title=dom-document-execCommand><a href=#execCommand>execCommand()</a></code> commands),
+  must fire mutation events as appropriate.</p>
+
   </div>
 
 
@@ -49573,7 +49574,7 @@
     steps:</p>
     <ol><li><p>If the document is an <span>XML document</span>, then
      throw an <code><a href=#invalid_access_err>INVALID_ACCESS_ERR</a></code> exception and abort
-     these steps.</li><!-- XXX support XML? -->
+     these steps.</li><!-- v2 support XML? -->
      <li><p>If the <var title="">value</var> argument wasn't
      specified, abort these steps without doing anything.</li>
      <li><p>If there is a selection, act as if the user had requested
@@ -49584,8 +49585,8 @@
      <i><a href=#context>context</a></i> element and with the <var title="">value</var>
      argument as <i><a href=#the-input-element>input</a></i>.</li>
      <li><p>Insert the nodes returned by the previous step into the
-     document at the location of the caret, without firing any
-     mutation events.</li>
+     document at the location of the caret, firing any mutation events
+     as appropriate.</li>
     </ol></dd>
    <dd><strong>Enabled When:</strong> The document is <a href=#ready-for-editing-host-commands>ready for
    editing host commands</a>.</dd>

Modified: source
===================================================================
--- source	2009-03-30 01:21:47 UTC (rev 2921)
+++ source	2009-03-30 22:56:06 UTC (rev 2922)
@@ -7266,7 +7266,8 @@
 
   </ol>
 
-  <p>On setting, the following algorithm must be run:</p>
+  <p>On setting, the following algorithm must be run. Mutation events
+  must be fired as appropriate.</p>
 
   <ol>
 
@@ -7281,9 +7282,6 @@
    <span>the <code>head</code> element</span> is null, then the
    attribute must do nothing. Stop the algorithm here.</li>
 
-   <!-- XXX define the following two paragraphs with respect to
-   mutation events (e.g. are mutation events fired synchronously) -->
-
    <li>If <span>the <code>title</code> element</span> is null, then a
    new <code>title</code> element must be created and appended to
    <span>the <code>head</code> element</span>.</li>
@@ -9086,12 +9084,8 @@
   (and the <span>HTML parser</span>) or XHTML in <span>XML
   documents</span> (and the <span>XML parser</span>).</p>
 
-  <!-- XXX must make sure we spec that innerHTML et al causes mutation
-  events to fire, but document.write() doesn't. (the latter is already
-  req-stated in the parser section, btw) -->
 
 
-
   <h4>Controlling the input stream</h4>
 
   <p>The <dfn title="dom-document-open"><code>open()</code></dfn>
@@ -9199,7 +9193,8 @@
    <code>Document</code> node and its descendants.</p>
 
    <li><p>Remove all child nodes of the document, without firing any
-   mutation events.</p></li>
+   mutation events.</p></li> <!-- as of 2009-03-30, only WebKit fired
+   mutation events here. -->
 
    <li><p>Replace the <code>Document</code>'s singleton objects with
    new instances of those objects. (This includes in particular the
@@ -9548,7 +9543,8 @@
    <li>
 
     <p>Remove the child nodes of the node whose <code
-    title="dom-innerHTML">innerHTML</code> attribute is being set.</p>
+    title="dom-innerHTML">innerHTML</code> attribute is being set,
+    firing appropriate mutation events.</p>
 
    </li>
 
@@ -9575,8 +9571,8 @@
 
     <p>Append all the <var title="">new children</var> nodes to the
     node whose <code title="dom-innerHTML">innerHTML</code> attribute
-    is being set, preserving their order, without firing any mutation
-    events.</p>
+    is being set, preserving their order, and firing mutation events
+    as appropriate.</p>
 
    </li>
 
@@ -9694,10 +9690,10 @@
 
    <li>
 
-    <p>Remove <var title="">target</var> from its parent node and
-    insert in its place all the <var title="">new children</var>
-    nodes, preserving their order, without firing any mutation
-    events.</p>
+    <p>Remove <var title="">target</var> from its parent node, firing
+    mutation events as appropriate, and then insert in its place all
+    the <var title="">new children</var> nodes, preserving their
+    order, and again firing mutation events as appropriate.</p>
 
    </li>
 
@@ -9858,8 +9854,7 @@
      <dd>
 
       <p>Insert all the <var title="">new children</var> nodes
-      immediately before <var title="">target</var>, preserving their
-      order.</p>
+      immediately before <var title="">target</var>.</p>
 
      </dd>
 
@@ -9869,9 +9864,9 @@
      <dd>
 
       <p>Insert all the <var title="">new children</var> nodes before
-      the first child of <var title="">target</var>, if there is one,
-      preserving their order. If there is no such child, append them
-      all to <var title="">target</var>, preserving their order.</p>
+      the first child of <var title="">target</var>, if there is
+      one. If there is no such child, append them all to <var
+      title="">target</var>.</p>
 
      </dd>
 
@@ -9881,7 +9876,7 @@
      <dd>
 
       <p>Append all the <var title="">new children</var> nodes to <var
-      title="">target</var>, preserving their order.</p>
+      title="">target</var>.</p>
 
      </dd>
 
@@ -9891,15 +9886,15 @@
      <dd>
 
       <p>Insert all the <var title="">new children</var> nodes
-      immediately after <var title="">target</var>, preserving their
-      order.</p>
+      immediately after <var title="">target</var>.</p>
 
      </dd>
 
     </dl>
 
-    <p>The above mutations must be performed without firing any
-    mutation events.</p>
+    <p>The <var title="">new children</var> nodes must be inserted in
+    a manner that preserves their order and fires mutation events as
+    appropriate.</p>
 
    </li>
 
@@ -45851,10 +45846,12 @@
     when an element is <span title="insert an element into a
     document">inserted into the document</span>.</p>
 
+    <!--
     <p>Asynchronous mutation events must be dispatched using <span
     title="concept-task">tasks</span> <span title="queue a
     task">queued</span> with the <span>DOM manipulation task
     source</span>. <a href="#refsDOMEVENTS">[DOMEVENTS]</a></p>
+    -->
 
    </dd>
 
@@ -55624,6 +55621,11 @@
   request to delete the content of <span>the selection</span> followed
   by a request to break the paragraph at that position.</p>
 
+  <p>All of the actions defined above, whether triggered by the user
+  or programmatically (e.g. by <code
+  title="dom-document-execCommand">execCommand()</code> commands),
+  must fire mutation events as appropriate.</p>
+
   </div>
 
 
@@ -57840,7 +57842,7 @@
     <ol>
      <li><p>If the document is an <span>XML document</span>, then
      throw an <code>INVALID_ACCESS_ERR</code> exception and abort
-     these steps.</p></li><!-- XXX support XML? -->
+     these steps.</p></li><!-- v2 support XML? -->
      <li><p>If the <var title="">value</var> argument wasn't
      specified, abort these steps without doing anything.</p></li>
      <li><p>If there is a selection, act as if the user had requested
@@ -57851,8 +57853,8 @@
      <i>context</i> element and with the <var title="">value</var>
      argument as <i>input</i>.</p></li>
      <li><p>Insert the nodes returned by the previous step into the
-     document at the location of the caret, without firing any
-     mutation events.</p></li>
+     document at the location of the caret, firing any mutation events
+     as appropriate.</p></li>
     </ol>
    </dd>
    <dd><strong>Enabled When:</strong> The document is <span>ready for




More information about the Commit-Watchers mailing list