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

Re: Remaining Problems with Explicit :scope Switching in find/findAll

From: Sean Hogan <shogun70@westnet.com.au>
Date: Sat, 26 Nov 2011 08:42:23 +1100
Message-ID: <4ED00BBF.7050609@westnet.com.au>
To: Yehuda Katz <wycats@gmail.com>
CC: "Tab Atkins Jr." <jackalmage@gmail.com>, Lachlan Hunt <lachlan.hunt@lachy.id.au>, Boris Zbarsky <bzbarsky@mit.edu>, public-webapps@w3.org
On 25/11/11 5:53 AM, Yehuda Katz wrote:
>
>     So, the rules end up being very simple.  find always evaluates against
>     the whole document.  If one of the selectors starts with a combinator
>     or doesn't contain a ":scope" pseudoclass somewhere in it, ":scope" is
>     prepended to it.  That's it.  With this, we make the most common cases
>     (searching descendants/siblings) easy, while making the global case
>     *also* easy.  There's a bit of intent-guessing when :scope is used in
>     an indirect way, but I believe it's better to err on the side of
>     simplicity and consistency there.
>
>
> I am ok with this, but I am also ok with "find always evaluates 
> against the whole document.  If one of the selectors doesn't contain a 
> ":scope" pseudoclass somewhere in it, ":scope" is prepended to it."
>
> I also thing we agreed that filtering selectors, in the case of 
> implicit scope, are applied on the :scope, not as a descendent of the 
> :scope.
>
> As I said above, since the cases of starting with a combinator are 
> nonsense queries (correct me if I'm missing something obvious), we can 
> simplify the rules even more and eliminate the case of "starting with 
> a combinator *and* has a :scope"

Are you AGAINST findAll() always implying :scope at the start of each 
selector in a selector list, and leaving explicit :scope to 
querySelectorAll()?

If so, why?

Sean
Received on Friday, 25 November 2011 21:43:08 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:49 GMT