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

Making selectors first-class citizens

From: Garrett Smith <dhtmlkitchen@gmail.com>
Date: Wed, 11 Sep 2013 23:14:28 -0700
Message-ID: <CABZUbM22VnGuhq-YyaO6U27tuJQbQ1BJYH-Wqf9kXwxGhAZ9+A@mail.gmail.com>
To: "www-style@w3.org" <www-style@w3.org>, WebApps WG <public-webapps@w3.org>
Cc: Robin Berjon <robin@w3.org>, Domenic Denicola <domenic@domenicdenicola.com>
FWD'ing to put my reply back on list (and to others)...

On Sep 11, 2013 6:35 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

var sel = new Selectors("i > love > selectors, so[much]")
sel.test(node)

# 2007 David Anderson proposed the idea.

That seems like a much nicer approach.

(It also means this can be neatly defined in the Selectors
specification, rather than in DOM, which means less work for me. :-))

# 2009 the API design remerged
http://lists.w3.org/Archives/Public/public-webapps/2009JulSep/1445.html

# 2010 Selectors explained in an article:
http://www.fortybelow.ca/hosted/dhtmlkitchen/JavaScript-Query-Engines.html
(search Query Matching Strategy).
-- 
Garrett
Twitter: @xkit
personx.tumblr.com
Received on Thursday, 12 September 2013 06:14:56 UTC

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