- From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
- Date: Thu, 01 May 2008 02:12:55 +0200
- To: John Resig <jresig@mozilla.com>
- Cc: public-webapi@w3.org
I'll address the rest of the issues in this thread later this week, but I just wanted to clarify this one issue now. John Resig wrote: > * Combinator-rooted Queries > > I read about some prior discussion concerning this (especially in > relation to DOMElement.querySelectorAll-style queries). This is an > important part of most libraries, as it stands. Maciej's proposed > solution of using :root to allow for front-leading combinators is > perfectly acceptable to me (where :root is made equivalent to the > element, not the document element). > > // jQuery $("#foo").find("> span"); > > // DOM document.getElementById("foo").querySelectorAll(":root > > span") > > This is something that a library can easily detect and inject. The current plan is to eventually try and introduce a :scope pseudo-class for that purpose. The Selectors spec clearly defines :root as matching "the root of the document", and redefining :root for use in these APIs alone doesn't seem like a good idea. -- Lachlan Hunt - Opera Software http://lachy.id.au/ http://www.opera.com/
Received on Thursday, 1 May 2008 00:13:36 UTC