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

Jonas Sicking wrote:
> If we merge DocumentSelector and ElementSelector into simply 
> NodeSelector we'll more or less automatically get the functions on 
> DocumentFragments.

Not necessarily.  I'm not advocating that all Nodes be castable to 
NodeSelector.  Just that whatever nodes querySelector(All) work on are.

> We'd also get it for attribute nodes which might be less desirable. 

I don't think it's desirable at all.

> Though we could say that the interface is only required to be 
> implemented on Documents, Elements and DocumentFragments.

That would be my suggestion, yes.  ;)

> 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.

Agreed.

That said, is there interest in getting this spec to CR quickly, since 
it seems some UAs are planning to ship it in the near future even though 
it's a Working Draft?  Or are said UAs willing to make changes to their 
implementation after shipping as the spec changes?

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

Again, agreed.

-Boris

Received on Friday, 14 March 2008 21:26:01 UTC