Re: QSA, the problem with ":scope", and naming

On Oct 21, 2011, at 7:57 PM, Sean Hogan wrote:
> It was definitely not a design flaw in QSA. As Alex's sample code shows it is possible to get findAll() behavior using QSA.
I think that further supports my argument.  JS libraries have commonly considered this to be an oversight in the design of QSA, hence the need for ID hack.  That is still true whether it was actually a design flaw or not.

> To do the reverse would involve calling document.findAll() then filtering for nodes that are descendants of the invoking node. 
I don't think anyone is interested in implementing the reverse in selector engines.  The most useful thing would be elem.findAll().  No manual filtering required.

> 
> But if findAll() is implemented they can advertise that avoiding non-standard pseudo selectors gives virtually native performance (on supporting platforms). I imagine this would be almost equivalent to deprecating them, which would be a win. 

This is extraneous.  The implementation of custom pseudo selectors would be identical.

- Timmy

Received on Saturday, 22 October 2011 18:45:20 UTC