W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2012

Re: [selectors-api] Consider backporting find() behavior to querySelector()

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Wed, 20 Jun 2012 16:26:14 +0200
Message-ID: <4FE1DD86.5030008@lachy.id.au>
To: Charles McCathieNevile <chaals@opera.com>
CC: "Tab Atkins Jr." <jackalmage@gmail.com>, Elliott Sprehn <esprehn@gmail.com>, Simon Pieters <simonp@opera.com>, "Kang-Hao (Kenny) Lu" <kennyluck@csail.mit.edu>, "public-webapps.w3.org" <public-webapps@w3.org>
On 2012-06-20 10:42, Charles McCathieNevile wrote:
> In other words we have the same arguments that we had five years ago,
> when we settled on querySelector as the one that provoked least objection.
> ...
> But spending another few months arguing about it hasn't proven that we
> are any wiser, nor (importantly) any closer to agreement.

This is why it should be an editorial decision, not a group vote.  The 
least-objectionable alternative is rarely the best alternative, and 
trying to please everyone is a fool's errand.  Hopefully, this time, the 
group will let me, as editor, evaluate the options and supporting 
rationale and make a decision based on that.

Right now, that draft uses find/findAll() simply because they're the 
names that were used throughout the discussion that led to them being 
added.  There are still issues to resolve, however, which I would like 
feedback on.

In particular, is there really value in adding two distinct methods that 
differ only by whether they return 1 element or a collection?  Resolving 
this issue first would help with resolving the naming issue.

It should be noted that JQuery/sizzle does not use querySelector() at 
all, AFAICS. It only uses querySelectorAll() and sometimes switches to 
.getElementById() or document.body.

-- 
Lachlan Hunt - Opera Software
http://lachy.id.au/
http://www.opera.com/
Received on Wednesday, 20 June 2012 14:26:48 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:52 GMT