Re: childElements, childElementCount, and children

On Tue, 20 Oct 2009 23:07:47 +0200, Doug Schepers <> wrote:
> I don't feel too strongly about having both .children and  
> .childElements, but I do think that .children is a little problematic  
> for authors... they will always have to check to see if Comment nodes  
> are included, because of the large marketshare for older versions of IE,  
> while .childElements allows them to write simple, clean, efficient code,  
> which is the whole point of an element-based API.

If a legacy implementation has a bug adding a new feature only introduces  
the chance of more bugs, it won't actually solve them nor will it help  
authors support the legacy implementation.

> I also prefer ElementCollection over HTMLCollection, especially for  
> environments where more XML is used.  I don't know if there are any  
> deeper issues that would advantage one over the other, but I think it  
> would be confusing to authors to collect non-HTML elements in something  
> labeled HTMLCollection.

You can request other data than XML using XMLHttpRequest. I don't think  
this should be of concern to us.

Anne van Kesteren

Received on Tuesday, 20 October 2009 21:13:50 UTC