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

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.

> The alternative, defining another set of methods would be something  
> that we could do, but that solution feels a lot less appealing.

I agree, :scope seems more elegant, and parallel methods can't handle  
the "> span" immediate children use case very nicely.

Regards,
Maciej

Received on Friday, 14 March 2008 23:05:14 UTC