W3C home > Mailing lists > Public > www-style@w3.org > April 2008

Re: [SelectorsAPI] Selector detection needed?

From: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Date: Mon, 07 Apr 2008 14:54:17 +0200
Message-ID: <47FA1979.1090805@disruptive-innovations.com>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
Cc: "Nicholas C. Zakas" <html@nczonline.net>, www-style@w3.org

Bjoern Hoehrmann wrote:

> There are several issues here, one is that implementations typically
> cannot tell selectors depending on unimplemented features and selectors
> with actual syntax errors apart. Clearly the latter kind should trigger
> some form of error response, typically an exception. Further, to avoid
> the many constants in your proposal, and to also consider other possible
> constraints (e.g., an implementation might support one id per selector
> but not multiple selectors) and to support selectors from dynamic
> sources, the testing function would take a whole selector, so ultimately
> there would be little difference between the two approaches. You could
> in fact implement your test function by checking for the exception.

Oh come on. So to test if the childhood combinator ">" is implemented,
you would query the elements matching a selector like "a > b" ???
That's a steamroller to kill a fly ! Performance-wise, it's just a
nightmare ; time-wise in a large document, it's a second nightmare ;
in terms of footprint, you should pick up a selector generating no
results for the query.

Björn, that is certainly one of the ugliest hacks ever proposed here...

</Daniel>
--
Co-Chair, W3C CSS WG
Received on Monday, 7 April 2008 12:54:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:04 GMT