[whatwg] getElementsByAttr

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.
[snip!]
> 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
behavior.

Dan

Received on Monday, 9 July 2007 10:23:18 UTC