[whatwg] getElementsByAttr

Dan Dorman dan.dorman at gmail.com
Mon Jul 9 10:23:18 PDT 2007

On 7/7/07, Sander <html5 at zoid.nl> wrote:
> But what if you only want the last element or the 5th? I guess selecting
> the last element can be just as usefull as the furst.
> selectFirstElement()
> selectLastElement()

I believe it would be possible to get all that behavior with the
appropriate arguments passed to selectElement though, unless I'm
missing something.

> These method names (the single selecting method names being variations
> on that of the plural method instead of the other way around) would be
> more clear as well in my opinion.

That's true, and if you really have your heart set on 'em, you could
always write your own wrapper functions to define that explicit


More information about the whatwg mailing list