Re: [SelectorsAPI] Selector detection needed?

I don't see this mentioned in the spec anywhere. The only error that seems to be mentioned is when an unresolvable namespace is encountered in a selector.

Regardless, do you think that throwing an error when an unknown selector is encountered is really the most appropriate way to go? I'd rather see this API go the way of capability detection rather than exception throwing. I think the former is easier to implement and more likely to be implemented than the latter. The DOM has hasFeature(), why shouldn't the Selectors API have something similar?


----- Original Message ----
From: Anne van Kesteren <>
To: Nicholas C. Zakas <>;
Sent: Sunday, April 6, 2008 2:56:03 AM
Subject: Re: [SelectorsAPI] Selector detection needed?

On Sun, 06 Apr 2008 10:36:07 +0200, Nicholas C. Zakas <>  
> Without this information, it's impossible to tell if a query returned no  
> results because there were no elements matching the pattern or if the  
> browser just didn't understand the selector being used.

Actually, the browser is required to throw a SYNTAX_ERR in that case, per  
the current specification.

Anne van Kesteren

You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.

Received on Monday, 7 April 2008 00:12:46 UTC