W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2009

Re: childElements, childElementCount, and children

From: Anne van Kesteren <annevk@opera.com>
Date: Tue, 20 Oct 2009 23:13:14 +0200
To: "Doug Schepers" <schepers@w3.org>, www-dom@w3.org
Message-ID: <op.u14akcou64w2qv@anne-van-kesterens-macbook.local>
On Tue, 20 Oct 2009 23:07:47 +0200, Doug Schepers <schepers@w3.org> 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
http://annevankesteren.nl/
Received on Tuesday, 20 October 2009 21:13:50 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:04 GMT