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

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 UTC