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

[selectors-api] some doubts

From: Joćo Eiras <joao.eiras@gmail.com>
Date: Fri, 09 May 2008 01:26:03 +0100
To: "Web APIs WG" <public-webapi@w3.org>
Cc: "Anne van Kesteren" <annevk@opera.com>
Message-ID: <op.uau15pu5jz3wb9@foobar.wag54gs>


Howdy.

I have the following doubts about the selectors api spec.

1) How do we deal with node.querySelectorAll(">foo") ?
  should this be considered a valid selector and return children of the  
context node with nodeName equal foo ?
  This is a valid use case, and widely used and supported by existing  
libraries.

2) How should following pseudo-classes be handled?
  :hover -> make this use case clear. Should hovered element be matched, or  
the class ignored ?
  :root -> should node.querySelectorAll(":root ...") jump to the document  
root and use the entire document as context ?

3) How should pseudo-elements be handled ?
  ::first-line
  ::first-letter
  ::selection
  ::before
  ::after pseudo-elements
  none of these elements are visible to the DOM, and ::selection contains a  
too complex data structure which cannot be represented with a NodeList.

Thanks.
Received on Friday, 9 May 2008 00:26:42 GMT

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