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

[whatwg] getElementsByAttr

From: Sander <html5@zoid.nl>
Date: Sun, 08 Jul 2007 02:53:44 +0200
Message-ID: <46903598.5070604@zoid.nl>

Lachlan Hunt schreef:
> 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.
> http://lists.w3.org/Archives/Public/public-webapi/2007Jun/0079.html
> 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.

Thanks for explaining. I guess the reason for not differentiating with 
the use of an optional extra argument is the fact that there already is 
an optional argument. Is that correct?

Received on Saturday, 7 July 2007 17:53:44 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:36 UTC