W3C home > Mailing lists > Public > public-webapi@w3.org > July 2007

Re: Selectors API Method Names

From: Doug Schepers <doug.schepers@vectoreal.com>
Date: Mon, 02 Jul 2007 15:17:03 -0400
Message-ID: <46894F2F.7070501@vectoreal.com>
To: Maciej Stachowiak <mjs@apple.com>
Cc: public-webapi <public-webapi@w3.org>

Hi, Maciej-

Maciej Stachowiak wrote:
> 
>> Similarly, with selectorQuery() (which is better), you lose the verby 
>> "action word" of the existing naming convention (getAByB); 
>> selectorQuery sounds more like a property than a method.
> 
> querySelector or matchSelector or similar would keep the verb phrase 
> pattern.

True.  Of those, I would much prefer matchSelector()... which is, for me 
at least, easier to type and less ambiguous.

Not that this is at all evidential, but querySelector sounds like you're 
asking the selector a question ("Hi, Selector, how's your day?"), while 
selectElement and matchSelector sound like commands ("Selector, go get 
me some elements!").

I still much prefer selectElement*(), fwiw.

Regards-
-Doug
Received on Monday, 2 July 2007 19:17:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:18:57 GMT