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

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