[whatwg] nextSiblingElement ?
ian at hixie.ch
Wed Jan 30 23:11:38 PST 2008
On Wed, 30 Jan 2008, Garrett Smith wrote:
> > One of the following drafts probably already handles your needs:
> > http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html#TreeWalker
> > http://www.w3.org/TR/ElementTraversal/
> To create a tree walker, define an accept() and then iterate through
> nodes, would be more effort than rewriting the hand-rolled
> Dom.getNextSibling function I posted every time. I guess I could replace
> the source code of my dom.getNextSiblingElement, but a for() loop is
> probably simpler.
> REally, all I want is
> nextSiblingElement/previousSiblingElement/childElements properties so I
> don't have to have library code or write a for() loop every time i want
> to just find the next sibling element.
Well then the second link I posted above is probably what you want.
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg