W3C home > Mailing lists > Public > public-webapi@w3.org > March 2008

Re: [Element Traversal LC] access to element by index

From: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Date: Fri, 28 Mar 2008 19:27:48 +0100
Message-ID: <47ED38A4.5040806@disruptive-innovations.com>
To: "Web APIs WG (public)" <public-webapi@w3.org>

> I'm actually not sure.  How often do authors want to get the third child 
> without knowing anything more about it than that it's an element? 
> Iterating through the kids (by means of ET or '.childNodes') gives you 
> much more context information (what type of element it is, what it's 
> bbox is, whether or not it has text/child content, etc.).  Not trying to 
> be a pain, but can you identify a concrete use case?

[admin: please Cc me, I am not following this mailing-list]

I probably has to use it in my daily code - find the n-th child element
of another given element - at least a dozen times in the last fifteen
days. Iterating through the kids is a for my point of view pure bloat
compared to myFooElement.childElements.item(3)...

</Daniel>
Received on Friday, 28 March 2008 18:28:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 28 March 2008 18:28:24 GMT