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

[whatwg] getElementsByAttr

From: Dan Dorman <dan.dorman@gmail.com>
Date: Mon, 9 Jul 2007 11:23:18 -0600
Message-ID: <317245a10707091023r3baba171w9a00a39883dc12cc@mail.gmail.com>
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

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