-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
"Following" does not work here. See https://www.w3.org/Bugs/Public/show_bug.cgi?id=28107 and #87 (comment).
- Loading branch information
Showing
1 changed file
with
17 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9287,10 +9287,23 @@ steps: | |
{{TreeWalker/currentNode}} attribute to <var>node</var> and return <var>node</var>. | ||
</ol> | ||
|
||
<li><p>If there is a <a>node</a> that is <a>following</a> <var>node</var> and is not | ||
<a>following</a> <a for=traversal>root</a>, then set <var>node</var> to the first such | ||
<a>node</a>. Otherwise, return null. | ||
<!-- Implemented as iterating over parent/nextSibling --> | ||
<li><p>Let <var>sibling</var> be null. | ||
|
||
<li><p>Let <var>temporary</var> be <var>node</var>. | ||
|
||
<li> | ||
<p>While <var>temporary</var> is non-null: | ||
|
||
<ol> | ||
<li><p>If <var>temporary</var> is the <a>context object</a>'s <a for=traversal>root</a>, then | ||
return null. | ||
|
||
<li><p>Set <var>sibling</var> to <var>temporary</var>'s <a for=tree>next sibling</a>. | ||
|
||
<li><p>If <var>sibling</var> is non-null, then <a for=iteration>break</a>. | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
annevk
Author
Member
|
||
|
||
<li><p>Set <var>temporary</var> to <var>temporary</var>'s <a for=tree>parent</a>. | ||
</ol> | ||
|
||
<li><p>Set <var>result</var> to the result of <a for=Node>filtering</a> <var>node</var>. | ||
|
||
|
This whole
while
loop is a no-op unless we grow thisthen
clause to something likethen set <var>node</var> to <var>temporary</var> and <a for=iteration>break</a>.