W3C home > Mailing lists > Public > www-style@w3.org > September 2013

Re: Making selectors first-class citizens

From: Rick Waldron <waldron.rick@gmail.com>
Date: Wed, 11 Sep 2013 09:52:28 -0400
Message-ID: <CAHfnhfos3km0Nm52ZBDwGAW0vPf0MBsb6kXEeb0qWC1hoPzzGw@mail.gmail.com>
To: Anne van Kesteren <annevk@annevk.nl>
Cc: WebApps WG <public-webapps@w3.org>, "www-style@w3.org" <www-style@w3.org>, Domenic Denicola <domenic@domenicdenicola.com>
On Wed, Sep 11, 2013 at 9:33 AM, Anne van Kesteren <annevk@annevk.nl> wrote:

> As far as I can tell Element.prototype.matches() is not deployed yet.
> Should we instead make selectors first-class citizens, just like
> regular expressions, and have this:
>
>   var sel = new Selectors("i > love > selectors, so[much]")
>   sel.test(node)
>

A prime use case: a cache of selector objects that are useful when matching
event.target for event handler delegation patterns. Can you describe the
Selector instance object a little more? Thanks!

Rick
Received on Wednesday, 11 September 2013 13:53:16 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:34 UTC