W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2008

Re: comment on Element Traversal Spec

From: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Date: Wed, 13 Aug 2008 19:04:49 +0200
Message-ID: <48A31431.2070504@disruptive-innovations.com>
To: Travis Leithead <travil@windows.microsoft.com>
Cc: "olli@pettay.fi" <olli@pettay.fi>, Webapps <public-webapps@w3.org>

Travis Leithead wrote:
> I thought that Node.nextSibling / previousSibling work this way? Isn't the whole reason for ElementTraversal to explicitly do element navigation only (a use case that nextSibling/previousSibling made more complicated for web developers)?

Having nextElementSibling available on Text and other nodes
will provide a great replacement for a code chunk the whole
web and JS chrome is full of :

   while (node && node.nodeType != Node.ELEMENT_NODE)
     node = node.nextSibling;

</Daniel>
Received on Wednesday, 13 August 2008 17:09:03 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:27 GMT