W3C home > Mailing lists > Public > www-style@w3.org > July 2008

Re: Opera's Proposal for :context Selector

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Wed, 16 Jul 2008 15:17:22 -0700
Message-ID: <487E7372.5050702@terrainformatica.com>
To: Lachlan Hunt <lachlan.hunt@lachy.id.au>
CC: Bert Bos <bert@w3.org>, www-style <www-style@w3.org>

Lachlan Hunt wrote:
> Bert Bos wrote:
>> (It seems to me you shouldn't need it at all. The problem seems to be 
>> that x.querySelector(":root") doesn't return x. That looks strange to 
>> me: you pass a tree and a pattern, and you get something outside the 
>> tree!? But I'm not an expert on that spec...)
> The API doesn't change the way in which an element is evaluated 
> against a selector; it's still evaluated in the context of the entire 
> document.  All it does is limit the collection of elements that are 
> evaluated against it.
Lachlan, do you have any particular use cases for such a behavior? At 
last: who requested such querySelector(), where that demand came from?

In the way you define this function it should be a method of the only 
document object:

   document.querySelector(selector [, scopeElement ])

That at least would be fair.
Anyway I've never seen this was requested anywhere but that's only me.

Andrew Fedoniouk.

Received on Wednesday, 16 July 2008 22:18:13 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:38 UTC