W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2011

Re: QSA, the problem with ":scope", and naming

From: Jonas Sicking <jonas@sicking.cc>
Date: Mon, 31 Oct 2011 14:19:50 -0700
Message-ID: <CA+c2ei-44cm8xWWncrzUH=aMDomxfC8Fn09pbNjHquGCLf2x3g@mail.gmail.com>
To: Alex Russell <slightlyoff@google.com>
Cc: Lachlan Hunt <lachlan.hunt@lachy.id.au>, "Tab Atkins Jr." <jackalmage@gmail.com>, Boris Zbarsky <bzbarsky@mit.edu>, Ojan Vafai <ojan@chromium.org>, Webapps WG <public-webapps@w3.org>, Yehuda Katz <wycats@gmail.com>, John Resig <jeresig@gmail.com>, Paul Irish <paulirish@google.com>
Ok, so we're down to not having full agreement on the following selectors:

On Mon, Oct 31, 2011 at 1:55 PM, Alex Russell <slightlyoff@google.com> wrote:
> On Fri, Oct 21, 2011 at 12:41 AM, Jonas Sicking <jonas@sicking.cc> wrote:
>> e.findAll("body > :scope > div")
> 1, 2, 3, 4
>> e.findAll("body > :scope > div, :scope")
> context, 1, 2, 3, 4

I'm hoping that you just made a mistake here? 4 isn't a child of the
context node. So in both of these I would think that 4 should be
removed based on your answers to the other questions.

>> e.findAll("div, :scope")
> context, 1, 2, 3, 4

Yehuda had a very different suggestion here but so far hasn't motivated why.

Personally I think Alex answer is the more useful one.

We just need to decide on something

>> e.findAll(":not(:scope)")
> empty set

Again, Yehuda had a different answer here. Though in this case I think
Yehuda's answer is more useful and consistent.

But I'm all ears for what the logic used to get to your answer and why
you think this is a better (more consistent? more useful?) answer.

/ Jonas
Received on Monday, 31 October 2011 21:20:56 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:36 UTC