W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2011

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

From: Timmy <timmywillisn@gmail.com>
Date: Sat, 22 Oct 2011 14:44:43 -0400
Cc: Alex Russell <slightlyoff@google.com>, Matt Shulman <mattsh@google.com>, Webapps WG <public-webapps@w3.org>, Yehuda Katz <wycats@gmail.com>, John Resig <jeresig@gmail.com>, Paul Irish <paulirish@google.com>, Lachlan Hunt <lachlan.hunt@lachy.id.au>
Message-Id: <76F1ED80-8E55-4B67-8ED0-87A3117C1F17@gmail.com>
To: Sean Hogan <shogun70@westnet.com.au>
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

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:36 UTC