[whatwg] getElementsByAttr

Lachlan Hunt lachlan.hunt at lachy.id.au
Fri Jul 6 16:00:33 PDT 2007


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.

-- 
Lachlan Hunt
http://lachy.id.au/



More information about the whatwg mailing list