Re: [SelectorsAPI] Thoughts on querySelectorAll

> I presume what you want instead is that element-rooted queries are
> handled by matching such that each simple selector (CSS2 definition)
> or sequence of simple selectors (css3-selectors definition, and I
> *still* object to changing the meaning of existing terms) must match
> an element that is or is a descendant of the specified element (the
> root of the query).
> 
> Or do you want to eliminate "is or" in my previous paragraph, to
> exclude the query root?  Or something else?

I would exclude "is or" - only descendant elements, in this case. For example:

  <div><div id="test"><div><div id="inner"></div></div></div></div>
  <script>
  // matches <div id="inner"></div>
  document.getElementById("test").querySelectorAll("div div").length == 1
  </script>

--John

Received on Wednesday, 30 April 2008 22:24:40 UTC