W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2012

Re: [dom] Should the return values of getElementsByClassName/TagName/TagNameNS be HTMLCollection

From: Anne van Kesteren <annevk@opera.com>
Date: Sat, 18 Feb 2012 18:48:21 +0100
To: "Boris Zbarsky" <bzbarsky@mit.edu>
Cc: "Ryosuke Niwa" <rniwa@webkit.org>, "Jonas Sicking" <jonas@sicking.cc>, www-dom@w3.org
Message-ID: <op.v9vyevze64w2qv@annevk-macbookpro.local>
On Sat, 18 Feb 2012 18:12:06 +0100, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 2/18/12 3:28 AM, Anne van Kesteren wrote:
>> Named getters are nice for authors, and besides, it was already pointed
>> out it's not avoidable here:
>> http://lists.w3.org/Archives/Public/www-dom/2012JanMar/0008.html
>
> That's true, but Jonas raises a good point: we should certainly not add  
> a named getter to .childNodes, say.

Well childNodes as you pointed out is a collection of nodes, not a  
collection of elements. I'm not sure it makes sense to expose element  
collections in wildly different ways, unless we want to discourage  
particular accessors.


-- 
Anne van Kesteren
http://annevankesteren.nl/
Received on Saturday, 18 February 2012 17:48:55 GMT

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