W3C home > Mailing lists > Public > public-webapi@w3.org > May 2008

Re: [selectors-api] some doubts

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 08 May 2008 19:45:11 -0500
Message-ID: <48239E97.30402@mit.edu>
To: João Eiras <joao.eiras@gmail.com>
CC: Web APIs WG <public-webapi@w3.org>

João Eiras wrote:
> 1) How do we deal with node.querySelectorAll(">foo") ?

That's come up on the list before, for what it's worth.  Still undecided.

> 2) How should following pseudo-classes be handled?
>  :hover -> make this use case clear. Should hovered element be matched, 
> or the class ignored ?

I thought it was pretty clear that the former was the case...

>  :root -> should node.querySelectorAll(":root ...") jump to the document 
> root and use the entire document as context ?

I actually asked precisely that a few weeks ago on this list.  The CSS Selectors 
spec makes it clear that :root matches the documentElement of the document.  In 
particular, it doesn't match anything in disconnected subtrees.

> 3) How should pseudo-elements be handled ?
>  ::first-line
>  ::first-letter
>  ::selection
>  ::before
>  ::after pseudo-elements

The draft says:

   Note: Using pseudo-elements in one of the selectors could mean
   that nothing is returned for that particular selector when it
   doesn’t resolve in one or more Element nodes.

-Boris
Received on Friday, 9 May 2008 00:45:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 9 May 2008 00:45:54 GMT