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

Re: [SelectorsAPI] Thoughts on querySelectorAll

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Thu, 01 May 2008 02:03:46 +0200
To: Jonas Sicking <jonas@sicking.cc>
Cc: John Resig <jresig@mozilla.com>, "L. David Baron" <dbaron@dbaron.org>, public-webapi@w3.org
Message-ID: <bj0i14lhs44kk8qujhj0gmd09b8rmh60jv@hive.bjoern.hoehrmann.de>

* Jonas Sicking wrote:
>It's not so much fact that it's a pseudo-class, but rather that it's a 
>"simple selector" (sorry dbaron, don't know the correct term) which 
>$self would be too. Unless we're redefining the CSS parsing rules which 
>would mean that we have a lot of work remaining.

The problem with using a pseudo-class, and I understood you to say as
much, is that right now e.querySelector(":a > b") would match any 'b'
element that has a parent element that both matches the 'a' condition
and is a descendant of 'e'. Except with :scope, where "descendant" be-
comes "descendant-or-self". So it would be magic among the pseudo-
classes. If some other syntax is used, there would not be a magic
pseudo-class, which raises less of the questions you were asking. I'm
not sure why this would not address the problem, clearly you would've
to specify how to parse and interpret the new syntax, right now $self
(or whatever syntax you'd use) is not valid in selectors.
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Thursday, 1 May 2008 00:04:25 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:26 UTC