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

Re: [SelectorsAPI] Thoughts on querySelectorAll

From: L. David Baron <dbaron@dbaron.org>
Date: Wed, 30 Apr 2008 15:09:46 -0700
To: John Resig <jresig@mozilla.com>
Cc: public-webapi@w3.org
Message-ID: <20080430220946.GA32751@ridley.dbaron.org>

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?


L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/
Received on Wednesday, 30 April 2008 22:10:25 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:10:01 UTC