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

Re: ACTION-87: Selectors API

From: Daniel Schierbeck <daniel.schierbeck@gmail.com>
Date: Sat, 25 Feb 2006 19:19:16 +0100
Message-ID: <44009FA4.9090605@gmail.com>
To: Anne van Kesteren <annevk@opera.com>
CC: "Web APIs WG (public)" <public-webapi@w3.org>

Anne van Kesteren wrote:
> Hi all,
> During the F2F I got an action assigned to me to draft something up 
> for getElementsBySelector(). Basically a method that would take a 
> selector[1] as argument and return a (static) list of elements. In the 
> current draft (attached) there is also an optional second argument 
> that takes an XPathNSResolver as argument. Might be a bit funny to see 
> things from the XPath API being reused in the one for Selectors, but 
> it seemed like the best and easiest solution.
> It is not clear at all if the WG will pursue working on this. Probably 
> depends on community input and if we think it's worth it. Now there is 
> at least something to discuss about.
> Cheers,
> Anne
> [1]<http://www.w3.org/TR/css3-selectors/>
Hi Anne,

This seems like a really good idea. I'm not sure about the method name.

getElementById(), getElementsByTagName(), etc. use a "property" of the 
elements to select them, here the id and the tag name (element type 
name). An element doesn't really have its own "selector", though. 
Therefore I think another name should be used, such as selectElements(). 
The best argument against this idea of mine is that getElementBy*() is 
already being used for all selecting.

Daniel Schierbeck
Received on Saturday, 25 February 2006 18:19:11 UTC

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