Making selectors first-class citizens

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