- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Mon, 07 Apr 2008 12:09:15 -0500
- To: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
- CC: "Web APIs WG (public)" <public-webapi@w3.org>, www-style Mailing List <www-style@w3.org>
[moving this to the right mailing list]
Daniel Glazman wrote:
> Oh come on. So to test if the childhood combinator ">" is implemented
Why would you be testing that? What's the use case?
The way I see this working in practice is something like this:
var elements;
try {
elements = document.querySelectorAll("something");
} catch (e) {
// Use a slower implementation of the "something" selector
}
This is certainly how I expect JS libraries to use querySelectorAll...
In what cases would you want to check whether a selector is parsed but _not_
actually try matching against it?
-Boris
Received on Monday, 7 April 2008 17:10:05 UTC