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

Selectors API naming

From: Dave Massy <Dave.Massy@microsoft.com>
Date: Wed, 13 Dec 2006 09:05:46 -0800
Message-ID: <9028F8A4183B97499A2949FD6DED8B8913EC0C0E@winse-msg-01.segroup.winse.corp.microsoft.com>
To: Anne van Kesteren <annevk@opera.com>, Charles McCathieNevile <chaals@opera.com>, <public-webapi@w3.org>
Moving to public-webapi@w3.org 

I don't think we are tied to a particular name for this, I think getElementsByGroupOfSelectors might be a little excessive :) However we'd just like the name to more clearly reflect the functionality rather than a generic sounding matchAll() which isn't really intended for generic use. It's our belief that it is important for names to reflect what they do where possible. Having a short name might save us all a few keystrokes but it is less clear to developers what the call is doing and can create bigger problems.

For examples sorry I meant staticNodeList. We have an example of it being returned in the spec but I don't see an example of it being accessed. We'd just like to be clear on how it is used.

Thanks
-Dave 


-----Original Message-----
From: Anne van Kesteren [mailto:annevk@opera.com] 
Sent: Wednesday, December 13, 2006 8:44 AM
To: Dave Massy; Charles McCathieNevile; Web API WG
Subject: Re: Fwd: Re: Selectors API

On Wed, 13 Dec 2006 17:39:24 +0100, Dave Massy <Dave.Massy@microsoft.com>  
wrote:
On Wed, 13 Dec 2006 17:38:59 +0100, Dave Massy <Dave.Massy@microsoft.com>  
wrote:
> We're concerned that such a generic name implies other things and in our  
> experience a specific name even if it is longer is better for  
> developers. Can we make this feel more in line with the DOM API?

So you're proposing we instead use:

   getElementByGroupOfSelectors()
   getElementsByGroupOfSelectors()

? I don't like that at all.


> It's not clear how the static Selector object works out in Javascript  
> code. Can we put together an example?

The specification is full of examples. What do you mean exactly? I think  
the "Selector" object is such is only relevant when you try to do  
Selector.prototype or something...


By the way, it would be much better if this was discussed on  
public-webapi@w3.org so developers following that list can give input as  
well.


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>
Received on Thursday, 14 December 2006 01:29:58 GMT

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