Skip to content
This repository has been archived by the owner on Nov 11, 2019. It is now read-only.

Fix #85: Remove unnecessary conditions from the 'traverse children' a… #123

Merged
merged 1 commit into from
Apr 12, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions sections/traversal.include
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,10 @@ interface TreeWalker {

<li><p>Set <var>node</var> to <var>node</var>'s <a>first child</a> if <var>type</var> is first, and <var>node</var>'s <a>last child</a> if <var>type</var> is last.

<li><p>If <var>node</var> is null, return null.

<li>
<p><dfn>Main</dfn>: While <var>node</var> is not null, run these substeps:
<p><dfn>Main</dfn>: Repeat these substeps:

<ol>
<li><p><a href="#node-filter">Filter</a> <var>node</var> and let <var>result</var> be the return value.
Expand All @@ -194,7 +196,7 @@ interface TreeWalker {
</ol>

<li>
<p>While <var>node</var> is not null, run these subsubsteps:
<p>Repeat these substeps:

<ol>
<li><p>Let <var>sibling</var> be <var>node</var>'s <a href="#tree-next-sibling">next sibling</a> if <var>type</var> is first, and <var>node</var>'s <a href="#tree-previous-sibling">previous sibling</a> if <var>type</var> is last.
Expand All @@ -208,7 +210,6 @@ interface TreeWalker {
<li><p>Otherwise, set <var>node</var> to <var>parent</var>.
</ol>
</ol>
<li><p>Return null.
</ol>

<p>The <dfn><code>firstChild()</code></dfn> method must <a>traverse children</a> of type first.
Expand Down