Re: [selectors-api] comments on Selectors API Level 2

2010-01-21 Thread Boris Zbarsky
On 1/21/10 1:01 PM, Bert Bos wrote: e.querySelector("*") == e Nope. querySelector on an element can only return descendants of the element. In fact, e.querySelector("*") will return the element's first element child, if any. That's surprising... What is the reason to not apply the sel

Re: [selectors-api] comments on Selectors API Level 2

2010-01-21 Thread Bert Bos
On Thursday 21 January 2010, Boris Zbarsky wrote: > On 1/21/10 11:11 AM, Bert Bos wrote: > > Here are some examples of relations that always hold. (Assume e is > > an element != NULL.) > > > > e.querySelector("*") == e.querySelector(":root") > > Not unless we've recently redefined :root. Can

Re: [selectors-api] comments on Selectors API Level 2

2010-01-21 Thread Tab Atkins Jr.
On Thu, Jan 21, 2010 at 10:11 AM, Bert Bos wrote: > 2) Drop queryScopedSelector() and queryScopedSelectorAll(). It is > trivially easy to replace a call to queryScopedSelector() by a call to > querySelector(). All you have to do is replace > >    e.queryScopedSelector(x) > by >    e.ownerDocument.

Re: [selectors-api] comments on Selectors API Level 2

2010-01-21 Thread Boris Zbarsky
On 1/21/10 11:11 AM, Bert Bos wrote: Here are some examples of relations that always hold. (Assume e is an element != NULL.) e.querySelector("*") == e.querySelector(":root") Not unless we've recently redefined :root. Can you point me to the place where that happened? e.querySele

Re: [selectors-api] comments on Selectors API Level 2

2010-01-21 Thread Bert Bos
On Wednesday 20 January 2010, Andrew Fedoniouk wrote: > Daniel Glazman wrote: > >I would recommend dropping the pseudo-class :scope and make a > > simpler model where a fictional :scope pseudo-class and a > > descendant combinator are prepended to all selectors passed as the > > argument of the

Re: [selectors-api] comments on Selectors API Level 2

2010-01-20 Thread Andrew Fedoniouk
Daniel Glazman wrote: I would recommend dropping the pseudo-class :scope and make a simpler model where a fictional :scope pseudo-class and a descendant combinator are prepended to all selectors passed as the argument of the corresponding APIs. There are cases where you will need

Re: [selectors-api] comments on Selectors API Level 2

2010-01-20 Thread Doug Schepers
Hi, folks- Since the Selectors API is so closely tied to CSS Selectors, which may affect implementations and the development of the CSS specs, I would suggest that there be a closer working relationship between the editors of Selectors API and the CSS WG. It's a bad sign of coordination to se

[selectors-api] comments on Selectors API Level 2

2010-01-19 Thread Daniel Glazman
Hi there. (this message contains personal comments and does not represent an official response from the CSS WG) I have read the recent Selectors API Level 2 draft [1] and have a few important comments to make: 1. I don't like the idea of refNodes. I think having the APIs specified at Elemen