Re: [SelectorsAPI] Thoughts on querySelectorAll

On Wednesday 2008-04-30 13:37 -0700, John Resig wrote:
> * DOMElement.querySelectorAll returning incorrect elements
> 
> This is the most critical issue. As it stands DOM Element-rooted
> queries are borderline useless to libraries - and users. Their
> default behavior is unexpected and confusing. Demonstrated with an

> This is due to the fact that element-rooted queries are handled by
> "finding all the elements that match the given selector -- rooted
> in the document -- then filtering by the ones that have the
> specified element as an ancestor." This is completely
> unacceptable. Not only is it not intuitive (finding elements that

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?

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/

Received on Wednesday, 30 April 2008 22:10:25 UTC