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

Re: Element Traversal comment

From: Doug Schepers <schepers@w3.org>
Date: Tue, 29 Jul 2008 20:55:26 -0400
Message-ID: <488FBBFE.4080805@w3.org>
To: "public-webapps@w3.org" <public-webapps@w3.org>

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 GMT

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