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

Re: [Selectors API 2] Is matchesSelector stable enough to unprefix in implementations?

From: Brian Kardell <bkardell@gmail.com>
Date: Tue, 22 Nov 2011 06:36:32 -0500
Message-ID: <CADC=+jcEfT+c_j9TZe9GB0jrDHotU-je4o9arYki2mVx0tjK6Q@mail.gmail.com>
To: Charles Pritchard <chuck@jumis.com>
Cc: Dominic Cooney <dominicc@chromium.org>, "Tab Atkins Jr." <jackalmage@gmail.com>, Yehuda Katz <wycats@gmail.com>, Roland Steiner <rolandsteiner@chromium.org>, public-webapps@w3.org, Boris Zbarsky <bzbarsky@mit.edu>, Dimitri Glazkov <dglazkov@chromium.org>, Sean Hogan <shogun70@westnet.com.au>
Complexity and discussions about combinators seem to have prevented it from
getting into any draft despite lots of +1s.  It is really different from
the rest of the selectors that exist today which are optimized like crazy
so it requires more in term of implementation than most to keep performance
sane.  As yet I think (for the same reasons)  no one has implemented
selectors 4 subject which is simpler than :has.
On Nov 22, 2011 5:06 AM, "Charles Pritchard" <chuck@jumis.com> wrote:

> **
> On 11/22/11 1:56 AM, Sean Hogan wrote:
>
> On 22/11/11 7:14 PM, Roland Steiner wrote:
>
> On Tue, Nov 22, 2011 at 14:19, Yehuda Katz <wycats@gmail.com> wrote:
>
>>
>> Yehuda Katz
>> (ph) 718.877.1325
>>
>>
>>  On Mon, Nov 21, 2011 at 8:34 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
>>
>>> On 11/21/11 11:31 AM, Tab Atkins Jr. wrote:
>>>
>>>>  1)  Make sense.
>>>>> 2)  Not break existing content.
>>>>> 3)  Be short.
>>>>>
>>>>
>>>> .matches
>>>> .is
>>>>
>>>
>>  I like .is, the name jQuery uses for this purpose. Any reason not to go
>> with it?
>>
>
>  IMHO 'is' seems awfully broad in meaning and doesn't very well indicate
> that the parameter should be a selector. Inasmuch I like .matches better.
>
>  Also, FWIW, an 'is' attribute on elements was/is in discussion on this
> ML as one possibility to specify components.
>
>
> Funnily enough, I've just been talking to the DOM5 and DOM6 API designers
> and they said almost exactly the same thing.
>
>
> On the the theme, Be short, are there issues with .has?
> if(node.has('[role="button"]')) node.is='button';
>
>
Received on Tuesday, 22 November 2011 11:37:03 GMT

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