W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2007

[whatwg] getElementsByAttr

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Sat, 07 Jul 2007 09:00:33 +1000
Message-ID: <468EC991.8080805@lachy.id.au>
Sander wrote:
> Charles McCathieNevile schreef:
>> the current editor's draft can be found at 
>> http://dev.w3.org/cvsweb/~checkout~/2006/webapi/selectors-api/Overview.html 
> I haven't read the whole draft yet so maybe it's in there, but can you, 
> or anyone else, explain why there is both a selectElement and a 
> selectAllElements method?

This explains why I retained both methods.


It's more efficient to use the singular method when only one element is 
required, than it is to create a node list and only use the first item.

Lachlan Hunt
Received on Friday, 6 July 2007 16:00:33 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:57 UTC