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

Making selectors first-class citizens

From: Anne van Kesteren <annevk@annevk.nl>
Date: Wed, 11 Sep 2013 14:33:42 +0100
Message-ID: <CADnb78jGJqe5QCuROO7Lk7WJ+kfAGk9guS45GBPMTzZehCC=0w@mail.gmail.com>
To: WebApps WG <public-webapps@w3.org>
Cc: "www-style@w3.org" <www-style@w3.org>, Domenic Denicola <domenic@domenicdenicola.com>
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)

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. :-))


-- 
http://annevankesteren.nl/
Received on Wednesday, 11 September 2013 13:34:09 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:32 UTC