Re: Element Traversal comment

Hi, João-

João Eiras wrote (on 7/29/08 7:10 PM):
> 
> The Element Traversal WD define childElementCount on the Element interface.
> Personally I see little use for such property by itself.
> It would make much more sense to have childElements (similar to 
> childNodes on Node), and therefore we could use childElements.length to 
> get the same value as childElementCount. childElements would also be a 
> live NodeList.
> 
> Most use cases for Element only transversal require looping NodeLists, 
> and if the author still has to filter nodes from these NodeLists by 
> their nodeType, then that beats the entire purpouse of this specification.

Thanks for your comment.  Last Call for this specification is over, but 
I appreciate your review nonetheless.

This issue has been discussed at great length (see this thread [1], 
among others), and a resolution has been reached.  Justification for the 
childElementCount attribute, including a concrete use case, in included 
in the specification, and the attribute has already been implemented in 
multiple user agents.

While many uses of Element Traversal do not require this attribute, I 
speak from personal developer experience when I confirm that it is 
useful.  So, no change to the specification will be made at this late 
stage.

[1] http://lists.w3.org/Archives/Public/public-webapi/2008Mar/0226.html

Regards-
-Doug Schepers
W3C Team Contact, WebApps, SVG, and CDF

Received on Wednesday, 30 July 2008 00:56:02 UTC