Re: comments on Selectors API WD

On Fri, 29 Sep 2006 09:50:45 +0200, Daniel Glazman  
<daniel.glazman@disruptive-innovations.com> wrote:
> 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.

We've been through this several times. Some people think the name is ok,  
others don't and I don't really care anymore.

Regarding the CSSOM, that will just let you access a selector as a  
DOMString and if it would provide an API that would be CSSSelector or  
something...


> 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.

Well, the option is kept for extending it to other nodes. I'd like scoped  
selectors to be defined first.


> 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.

I don't think adding more arguments is acceptable.


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

If you could provide a testsuite, that'd be cool!


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>

Received on Friday, 29 September 2006 08:44:13 UTC