Re: Making selectors first-class citizens

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:18 UTC