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

Re: [selectors-api] Why no querySelector(All) on DocumentFragments?

From: Ian Hickson <ian@hixie.ch>
Date: Sat, 15 Mar 2008 05:18:53 +0000 (UTC)
To: Maciej Stachowiak <mjs@apple.com>
Cc: Jonas Sicking <jonas@sicking.cc>, Boris Zbarsky <bzbarsky@MIT.EDU>, "Web APIs WG (public)" <public-webapi@w3.org>
Message-ID: <Pine.LNX.4.62.0803150513230.17076@hixie.dreamhostps.com>

On Fri, 14 Mar 2008, Maciej Stachowiak wrote:
> On Mar 14, 2008, at 1:56 PM, Jonas Sicking wrote:
> > 
> > > I think ability to do element-rooted selector queries (either 
> > > through a new method or a :scope pseudo-element) is more important, 
> > > since it's needed to replicate the feature set of JS query 
> > > libraries.
> > 
> > If we could get a :scope pseudo-element that would be an excellent 
> > solution IMHO, and would be great with scoped stylesheets as has been 
> > pointed out elsewhere in the last few days.
> > 
> > Is that something that should be defined by this WG? It would suck to 
> > have to wait for Level 4 Selectors. Other WGs have defined selectors, 
> > but I'm not sure how good of an idea that is.
> I would prefer to see it in the Selectors spec, but it would have to 
> come out of CR for that. Perhaps the editor of the Selectors spec 
> (Hixie) would like to weigh in. Alternately, we could temporarily define 
> the pseudo-element in the Selectors API spec.

(It would be a pseudo-class, not a pseudo-element.)

The :matches() proposal uses "#" for the concept of "context node".

XBL2 uses :bound-element for a similar concept.

I don't think this feature is critical to the selectors API. I would 
recommend going ahead with the API as it is now, and moving this extension 
to a second version, or possibly to the next version of the Selectors 
spec. I think it would be a good idea for someone to start working on the 
next Selectors spec anyway, to spec out :matches(), the DOM attributes 
stuff ([#textContent*='...'], [#col=4], [#row<2], etc), this, and the 
various other new ideas that have been suggested since Selectors last had 
new features suggested.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Saturday, 15 March 2008 05:45:59 UTC

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