W3C home > Mailing lists > Public > public-webapi@w3.org > December 2006

Re: Selectors API naming

From: Martijn <martijn.martijn@gmail.com>
Date: Tue, 19 Dec 2006 16:02:01 +0100
Message-ID: <6c97b8b10612190702r132aa691q1dbba7a0c6579d10@mail.gmail.com>
To: "Ian Hickson" <ian@hixie.ch>
Cc: "Chris Wilson" <Chris.Wilson@microsoft.com>, "Dave Massy" <dave.massy@microsoft.com>, "Anne van Kesteren" <annevk@opera.com>, "Web API WG (public)" <public-webapi@w3.org>

On 12/19/06, Ian Hickson <ian@hixie.ch> wrote:
> > I'd rather a webdev not have to understand "oh, this API was done by the
> > DOM WG, so it uses this naming... this one was done by the WebAPI WG, so
> > it uses this other one..."
> Well, the most obvious method name would be "document.select()". It's
> clear what it does given the context, and fits in well with the similar
> existing functionality, "document.all". Would "select()" be ok with you?

I don't think that "document.select()" is clear at all. My first
though would be, it is a method to select everything on the web page.
I think "document.getElementsBySelector()" is much more clearer. Also,
it is much more consistent with "document.getElementsByTagName()" and
"document.getElementById()" for instance.


> Ian Hickson               U+1047E                )\._.,--....,'``.    fL
> http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
> Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Martijn Wargers
Help Mozilla!
Received on Tuesday, 19 December 2006 15:02:12 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:22 UTC