- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 30 Mar 2009 22:56:14 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec In directory hutz:/tmp/cvs-serv14070 Modified Files: Overview.html Log Message: Defer to mutation events spec. (whatwg r2922) Index: Overview.html =================================================================== RCS file: /sources/public/html5/spec/Overview.html,v retrieving revision 1.2086 retrieving revision 1.2087 diff -u -d -r1.2086 -r1.2087 --- Overview.html 30 Mar 2009 01:21:52 -0000 1.2086 +++ Overview.html 30 Mar 2009 22:56:11 -0000 1.2087 @@ -6471,7 +6471,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>" @@ -6484,9 +6485,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> @@ -7772,9 +7770,7 @@ document interact with the parser, and thus their behavior, varies depending on whether they are used with <a href=#html-documents>HTML documents</a> (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> + documents</a> (and the <a href=#xml-parser>XML parser</a>).<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> method comes in several variants with different numbers of arguments.<dl class=domintro><dt><var title="">document</var> = <var title="">document</var> . <code title=dom-document-open><a href=#dom-document-open>open</a></code>( [ <var title="">type</var> [, <var title="">replace</var> ] ] )</dt> @@ -7867,7 +7863,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 @@ -8154,7 +8151,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> @@ -8181,8 +8179,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> @@ -8278,10 +8276,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> @@ -8412,8 +8410,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> @@ -8423,9 +8420,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> @@ -8434,7 +8430,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> @@ -8444,13 +8440,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> @@ -36063,9 +36059,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=#references>[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="#references">[DOMEVENTS]</a></p> + --> </dd> @@ -42605,6 +42604,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><h4 id=making-entire-documents-editable><span class=secno>6.7.2 </span>Making entire documents editable</h4><div class=impl> <p>Documents have a <dfn id=designMode title=dom-document-designMode><code>designMode</code></dfn>, which @@ -44303,7 +44306,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 @@ -44314,8 +44317,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>
Received on Monday, 30 March 2009 22:56:24 UTC