Hello,

Here are my comments on the last WD Selectors API :

1. I think the title of the document is badly chosen. The spec*
   does not offer any API on selectors themselves but, in substance,
   offers an implementation for document.getElementsBySelector().
   Since we may have in the future a real API for accessing selectors
   themselves into the CSS OM, I strongly recommend a name more
   related to the contents than it is today.

2. I think it's an error to restrict this new API to the document
   level, in particular if we have scoped stylesheets in the near
   future. I recommend extending the API to all nodes.

3. for scoped stylesheets, and if item 2 above is accepted, I recommend
   adding a boolean parameter to both matchSingl() and matchAll()
   methods saying if it's a scoped request or not. In the case of a
   scoped request, the :root pseudo-class then represents the current
   node on which the method is invoked.

4. I really hate having two different methods for matchSingle and
   matchAll, and I'd prefer a single method with a boolean indicating
   if only the first result should be retrieved or all. The result
   should always be a StaticNodeList. If the boolean is true, then the
   length of the result is <= 1, and it's unconstrained otherwise.

5. Disruptive Innovations SARL becoming a W3C member on the 1st of
   October, we are ready to help on this specification.

Best,

</Daniel>

Reply via email to