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

Re: comments on Selectors API WD

From: Anne van Kesteren <annevk@opera.com>
Date: Fri, 29 Sep 2006 11:25:27 +0200
To: "Daniel Glazman" <daniel.glazman@disruptive-innovations.com>
Cc: "Web APIs WG (public)" <public-webapi@w3.org>
Message-ID: <op.tgmu4ptd64w2qv@id-c0020>

On Fri, 29 Sep 2006 10:54:36 +0200, Daniel Glazman  
<daniel.glazman@disruptive-innovations.com> wrote:
> Well having matchSingle and matchAll reply two different things is from
> here hardly acceptable too... That means that a given code will have to
> implement two different handlers depending on the queried set, first one
> or all.

I don't really understand this argument. You need a separate codepath  
anyway because you only want to return the first and you might want to use  
some different (faster) code for that than when you're returning all nodes  
matching a given group of selectors.

> At least, make both methods reply a StaticNodeList please !
> On scoped stylesheets :
>    getElementsByTagName() is available on all Elements and matchAll()
>    won't be allowed on Elements ??? While the former is a subcase of the
>    latter ? Wow... Sorry, this is, from a DOM user point of view, VERY
>    suboptimal

So have the CSS WG define scoped selectors. I don't think the Web APIs WG  
should define that. This API isn't set in stone, there will be a version 2  
if there's sufficient demand and need.

Anne van Kesteren
Received on Friday, 29 September 2006 09:25:45 UTC

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