W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2010

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

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 21 Jan 2010 11:18:56 -0500
Message-ID: <4B587E70.4060904@mit.edu>
To: Bert Bos <bert@w3.org>
CC: public-webapps@w3.org, "www-style@w3.org" <www-style@w3.org>
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.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.

>      e.querySelector(":root + *") == NULL
>      e.querySelector(":root:first-child") == NULL

Agreed, because as currently defined :root will not match anything in 
the subtree rooted at |e|, ever.

>      e.querySelector("* *") == e.querySelector(":root>  :first-child")
>      e.querySelector(":odd") == e.querySelector(":root>  :first-child")

Again, not as :root is currently defined.

-Boris
Received on Thursday, 21 January 2010 16:19:31 GMT

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