Permalink
Browse files

define nodes are inserted/removed hooks in a way that is easier for HTML

  • Loading branch information...
1 parent ce4ffbd commit 68206e30041ddb3d3e0b1d79617773b87b855159 @annevk annevk committed Sep 21, 2012
Showing with 59 additions and 44 deletions.
  1. +32 −23 Overview.src.html
  2. +0 −3 README.markdown
  3. +27 −18 dom-core.html
View
@@ -19,9 +19,9 @@ <h2 class="no-num no-toc">Living Standard &mdash; Last Updated [DATE: 01 Jan 190
<dl>
<dt>This Version:
- <dd class=now3c><a href="http://dom.spec.whatwg.org/">http://dom.spec.whatwg.org/</a>
+ <dd><a href="http://dom.spec.whatwg.org/">http://dom.spec.whatwg.org/</a>
- <dt class=dontpublish>Participate:</dt>
+ <dt>Participate:</dt>
<dd class=dontpublish>Send feedback to
<a href="mailto:www-dom@w3.org?subject=%5Bdom%5D%20">www-dom@w3.org</a> (<a href="http://lists.w3.org/Archives/Public/www-dom/">archives</a>) or
<a href="https://www.w3.org/Bugs/Public/enter_bug.cgi?product=WebAppsWG&amp;component=DOM">file a bug</a>
@@ -1475,8 +1475,8 @@ <h2 class=no-num>Goals</h2>
<h4>Mutation algorithms</h4>
-<p>At certain points in the algorithms below it is said that
-<dfn>nodes are inserted</dfn> or <dfn>nodes are removed</dfn>. These are
+<p>At certain points in the algorithms below it is said that a
+<dfn>node is inserted</dfn> or a <dfn>node is removed</dfn>. These are
hooks for <span>other applicable specifications</span> to process the
<span title=concept-node>nodes</span> that have been inserted or removed
further and ensures that when multiple <span title=concept-node>nodes</span>
@@ -1627,7 +1627,7 @@ <h2 class=no-num>Goals</h2>
list containing solely <var title>node</var> otherwise.
<li>
- <p>If <var title="">node</var> is a <code>DocumentFragment</code>
+ <p>If <var title>node</var> is a <code>DocumentFragment</code>
<span title=concept-node>node</span>,
<span title=concept-MO-queue-childList>queue a "<code>childList</code>" record</span>
with target <var title>node</var>, addedNodes null, removedNodes
@@ -1636,28 +1636,30 @@ <h2 class=no-num>Goals</h2>
<p class=note>This step does intentionally not pay attention to the
<i title>suppress observers flag</i>.
- <li><p>If <var title="">node</var> is a <code>DocumentFragment</code>
+ <li><p>If <var title>node</var> is a <code>DocumentFragment</code>
<span title=concept-node>node</span>,
<span title=concept-node-remove>remove</span> its
<span title=concept-tree-child>children</span> with the
<i title>suppress observers flag</i> set.
<li><p>If <i title>suppress observers flag</i> is unset,
<span title=concept-MO-queue-childList>queue a "<code>childList</code>" record</span>
- with target <var title="">parent</var>, addedNodes <var title>nodes</var>,
+ with target <var title>parent</var>, addedNodes <var title>nodes</var>,
removedNodes null, nextSibling <var title>child</var>, and previousSibling
<var title>child</var>'s
<span title=concept-tree-previous-sibling>previous sibling</span>
or <var title>parent</var>'s
<span title=concept-tree-last-child>last child</span> if
<var title>child</var> is null.
- <li><p>Insert all nodes in <var title>nodes</var> before
- <var title>child</var> or at the end of <var title>parent</var> if
- <var title>child</var> is null.
+ <li><p>Insert all <span title=concept-node>nodes</span> in
+ <var title>nodes</var> before <var title>child</var> or at the end of
+ <var title>parent</var> if <var title>child</var> is null.
- <li><p>If <i title>suppress observers flag</i> is unset,
- <span>nodes are inserted</span>.
+ <li><p>If <i title>suppress observers flag</i> is unset, for each
+ <span title=concept-node>node</span> in <var title>nodes</var>, in
+ <span title=concept-tree-order>tree order</span> run
+ <span>node is inserted</span>.
</ol>
@@ -1777,14 +1779,17 @@ <h2 class=no-num>Goals</h2>
list containing solely <var title>node</var> otherwise.
<li><p><span title=concept-MO-queue-childList>queue a "<code>childList</code>" record</span>
- with target <var title="">parent</var>, addedNodes
+ with target <var title>parent</var>, addedNodes
<var title>nodes</var>, removedNodes a list solely containing
<var title>child</var>, nextSibling <var title>reference child</var>, and
previousSibling <var title>child</var>'s
<span title=concept-tree-previous-sibling>previous sibling</span>.
- <li><p>At this point <span>nodes are removed</span> and
- <span>nodes are inserted</span>.
+ <li><p>Run <span>node is removed</span> for <var title>child</var>, and
+ then for each <span title=concept-node>node</span> in
+ <var title>nodes</var>, in
+ <span title=concept-tree-order>tree order</span>, run
+ <span>node is inserted</span>.
<li><p>Return <var title>child</var>.
</ol>
@@ -1814,13 +1819,17 @@ <h2 class=no-num>Goals</h2>
<var title>node</var> otherwise.
<li><p><span title=concept-MO-queue-childList>queue a "<code>childList</code>" record</span>
- with target <var title="">parent</var>, addedNodes
+ with target <var title>parent</var>, addedNodes
<var title>nodes</var>, removedNodes <var title>parent</var>'s
<span title=concept-tree-child>children</span>, nextSibling null, and
previousSibling null.
- <li><p>At this point <span>nodes are removed</span> and
- <span>nodes are inserted</span>.
+ <li><p>Run <span>node is removed</span> for each
+ <span title=concept-tree-child>child</span> of <var title>parent</var>, in
+ <span title=concept-tree-order>tree order</span>, and then
+ for each <span title=concept-node>node</span> in <var title>nodes</var>, in
+ <span title=concept-tree-order>tree order</span>, run
+ <span>node is inserted</span>.
</ol>
<p class=note>This algorithm does not make any checks with regards to the
@@ -1903,8 +1912,8 @@ <h2 class=no-num>Goals</h2>
<li><p>Remove <var title>node</var> from its <var title>parent</var>.
- <li><p>If <i title>suppress observers flag</i> is unset,
- <span>nodes are removed</span>.
+ <li><p>If <i title>suppress observers flag</i> is unset, run
+ <span>node is removed</span> for <var title>node</var>.
</ol>
@@ -5005,7 +5014,7 @@ <h2 class=no-num>Goals</h2>
is <var title>localName</var>, or null if there is no such
<span title=concept-attribute>attribute</span>.
- <li><p>If <var title="">attribute</var> is null, create an
+ <li><p>If <var title>attribute</var> is null, create an
<span title=concept-attribute>attribute</span> whose
<span title=concept-attribute-name>name</span> is
<var title>name</var>,
@@ -5258,7 +5267,7 @@ <h2 class=no-num>Goals</h2>
<span title=concept-attribute-namespace>namespace</span>, and oldValue
null.
- <li><p>Append the <var title>attribute</var> to the <var title="">element</var>'s
+ <li><p>Append the <var title>attribute</var> to the <var title>element</var>'s
<span title=concept-element-attribute>attribute list</span>.
</ol>
@@ -8888,5 +8897,5 @@ <h2 class=no-num>Acknowledgments</h2>
Lauren Wood, Mike Champion, Peter Sharpe, Philippe Le Hégaret, Robin Berjon,
Steve Byrne, Tom Pixley, and Vidur Apparao.
-<script id=head src=http://www.whatwg.org/specs/web-apps/current-work/dfn.js class=dontpublish></script>
+<script id=head src=http://www.whatwg.org/specs/web-apps/current-work/dfn.js></script>
<!-- vim: set expandtab shiftwidth=1 tabstop=1 textwidth=76 -->
View
@@ -1,3 +0,0 @@
-The repository for the [DOM](http://dom.spec.whatwg.org/).
-
-For make details see [setting up Anolis with cross-specification cross-references](http://wiki.whatwg.org/wiki/Anolis).
View
@@ -8,13 +8,13 @@
<div class="head">
<h1>DOM</h1>
- <h2 class="no-num no-toc" id="living-standard-—-last-updated-12-september-2012">Living Standard — Last Updated 12 September 2012</h2>
+ <h2 class="no-num no-toc" id="living-standard-—-last-updated-21-september-2012">Living Standard — Last Updated 21 September 2012</h2>
<dl>
<dt>This Version:
- <dd class="now3c"><a href="http://dom.spec.whatwg.org/">http://dom.spec.whatwg.org/</a>
+ <dd><a href="http://dom.spec.whatwg.org/">http://dom.spec.whatwg.org/</a>
- <dt class="dontpublish">Participate:</dt>
+ <dt>Participate:</dt>
<dd class="dontpublish">Send feedback to
<a href="mailto:www-dom@w3.org?subject=%5Bdom%5D%20">www-dom@w3.org</a> (<a href="http://lists.w3.org/Archives/Public/www-dom/">archives</a>) or
<a href="https://www.w3.org/Bugs/Public/enter_bug.cgi?product=WebAppsWG&amp;component=DOM">file a bug</a>
@@ -39,7 +39,7 @@ <h2 class="no-num no-toc" id="living-standard-—-last-updated-12-september-2012
<p class="copyright"><a href="http://creativecommons.org/publicdomain/zero/1.0/" rel="license"><img alt="CC0" src="http://i.creativecommons.org/p/zero/1.0/80x15.png"></a>
To the extent possible under law, the editors have waived all copyright and
related or neighboring rights to this work. In addition, as of
-12 September 2012, the editors have made this specification available
+21 September 2012, the editors have made this specification available
under the
<a href="http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0" rel="license">Open Web Foundation Agreement Version 1.0</a>,
which is available at
@@ -1536,8 +1536,8 @@ <h3 id="node-tree"><span class="secno">5.2 </span>Node tree</h3>
<h4 id="mutation-algorithms"><span class="secno">5.2.1 </span>Mutation algorithms</h4>
-<p>At certain points in the algorithms below it is said that
-<dfn id="nodes-are-inserted">nodes are inserted</dfn> or <dfn id="nodes-are-removed">nodes are removed</dfn>. These are
+<p>At certain points in the algorithms below it is said that a
+<dfn id="node-is-inserted">node is inserted</dfn> or a <dfn id="node-is-removed">node is removed</dfn>. These are
hooks for <a href="#other-applicable-specifications">other applicable specifications</a> to process the
<a href="#concept-node" title="concept-node">nodes</a> that have been inserted or removed
further and ensures that when multiple <a href="#concept-node" title="concept-node">nodes</a>
@@ -1713,12 +1713,14 @@ <h4 id="mutation-algorithms"><span class="secno">5.2.1 </span>Mutation algorithm
<a href="#concept-tree-last-child" title="concept-tree-last-child">last child</a> if
<var title="">child</var> is null.
- <li><p>Insert all nodes in <var title="">nodes</var> before
- <var title="">child</var> or at the end of <var title="">parent</var> if
- <var title="">child</var> is null.
+ <li><p>Insert all <a href="#concept-node" title="concept-node">nodes</a> in
+ <var title="">nodes</var> before <var title="">child</var> or at the end of
+ <var title="">parent</var> if <var title="">child</var> is null.
- <li><p>If <i title="">suppress observers flag</i> is unset,
- <a href="#nodes-are-inserted">nodes are inserted</a>.
+ <li><p>If <i title="">suppress observers flag</i> is unset, for each
+ <a href="#concept-node" title="concept-node">node</a> in <var title="">nodes</var>, in
+ <a href="#concept-tree-order" title="concept-tree-order">tree order</a> run
+ <a href="#node-is-inserted">node is inserted</a>.
</ol>
@@ -1844,8 +1846,11 @@ <h4 id="mutation-algorithms"><span class="secno">5.2.1 </span>Mutation algorithm
previousSibling <var title="">child</var>'s
<a href="#concept-tree-previous-sibling" title="concept-tree-previous-sibling">previous sibling</a>.
- <li><p>At this point <a href="#nodes-are-removed">nodes are removed</a> and
- <a href="#nodes-are-inserted">nodes are inserted</a>.
+ <li><p>Run <a href="#node-is-removed">node is removed</a> for <var title="">child</var>, and
+ then for each <a href="#concept-node" title="concept-node">node</a> in
+ <var title="">nodes</var>, in
+ <a href="#concept-tree-order" title="concept-tree-order">tree order</a>, run
+ <a href="#node-is-inserted">node is inserted</a>.
<li><p>Return <var title="">child</var>.
</ol>
@@ -1880,8 +1885,12 @@ <h4 id="mutation-algorithms"><span class="secno">5.2.1 </span>Mutation algorithm
<a href="#concept-tree-child" title="concept-tree-child">children</a>, nextSibling null, and
previousSibling null.
- <li><p>At this point <a href="#nodes-are-removed">nodes are removed</a> and
- <a href="#nodes-are-inserted">nodes are inserted</a>.
+ <li><p>Run <a href="#node-is-removed">node is removed</a> for each
+ <a href="#concept-tree-child" title="concept-tree-child">child</a> of <var title="">parent</var>, in
+ <a href="#concept-tree-order" title="concept-tree-order">tree order</a>, and then
+ for each <a href="#concept-node" title="concept-node">node</a> in <var title="">nodes</var>, in
+ <a href="#concept-tree-order" title="concept-tree-order">tree order</a>, run
+ <a href="#node-is-inserted">node is inserted</a>.
</ol>
<p class="note">This algorithm does not make any checks with regards to the
@@ -1964,8 +1973,8 @@ <h4 id="mutation-algorithms"><span class="secno">5.2.1 </span>Mutation algorithm
<li><p>Remove <var title="">node</var> from its <var title="">parent</var>.
- <li><p>If <i title="">suppress observers flag</i> is unset,
- <a href="#nodes-are-removed">nodes are removed</a>.
+ <li><p>If <i title="">suppress observers flag</i> is unset, run
+ <a href="#node-is-removed">node is removed</a> for <var title="">node</var>.
</ol>
@@ -8928,5 +8937,5 @@ <h2 class="no-num" id="acknowledgments">Acknowledgments</h2>
Lauren Wood, Mike Champion, Peter Sharpe, Philippe Le Hégaret, Robin Berjon,
Steve Byrne, Tom Pixley, and Vidur Apparao.
-<script class="dontpublish" id="head" src="http://www.whatwg.org/specs/web-apps/current-work/dfn.js"></script>
+<script id="head" src="http://www.whatwg.org/specs/web-apps/current-work/dfn.js"></script>
<!-- vim: set expandtab shiftwidth=1 tabstop=1 textwidth=76 -->

0 comments on commit 68206e3

Please sign in to comment.