Confirmed users
146
edits
mNo edit summary |
|||
Line 29: | Line 29: | ||
=== Re-initialize iterator for each child node === | === Re-initialize iterator for each child node === | ||
This might mean creating a special iterator which the parent iterator or caller refers to, using the child nodes of the common ancestor as appropriate. When the iterator runs out of nodes for one child node of the common ancestor, move to the next child node of the common ancestor. | This might mean creating a special iterator which the parent iterator or caller refers to, using the child nodes of the common ancestor as appropriate. Or it might mean the current iterator gets its key parameters reset. When the iterator runs out of nodes for one child node of the common ancestor, move to the next child node of the common ancestor. | ||
We have to be a little careful in this approach, in that we can't cache the child nodes of the common ancestor ahead of time. DOM node trees are live, and can be updated at any time. | We have to be a little careful in this approach, in that we can't cache the child nodes of the common ancestor ahead of time. DOM node trees are live, and can be updated at any time. | ||
=== Special-case handling of null mCommonParent values === | === Special-case handling of null mCommonParent values === |