[webkit-dev] [DOMNodeIterator nextNode] continuing outside of root object?

Darin Adler darin at apple.com
Wed Apr 19 10:15:19 PDT 2006


On Apr 19, 2006, at 8:31 AM, Matt Gough wrote:

> Can someone please confirm that [DOMNodeIterator nextNode]  
> shouldn't be returning items outside of the root node that is  
> passed into createNodeIterator.

The node iterator and tree walker implementations have problems.  
Luckily, this is rarely an issue since the classes aren't really all  
that helpful.

I recommend iterating yourself using plain old DOM tree-walking calls  
like nextSibling, firstChild, etc. It's straightforward to do that.

Bug reports about specific problems with node iterator would be  
welcome, since these may be important for website compatibility. Even  
more welcome would be patches to fix the node iterator and tree walker.

     -- Darin




More information about the webkit-dev mailing list