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

Re: [SelectorsAPI] Selector detection needed?

From: Nicholas C. Zakas <html@nczonline.net>
Date: Sun, 6 Apr 2008 16:10:01 -0700 (PDT)
To: Anne van Kesteren <annevk@opera.com>, www-style@w3.org
Message-ID: <261223.19145.qm@web57711.mail.re3.yahoo.com>

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?

-Nicholas

----- Original Message ----
From: Anne van Kesteren <annevk@opera.com>
To: Nicholas C. Zakas <html@nczonline.net>; www-style@w3.org
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 <html@nczonline.net>  
wrote:
> 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
<http://annevankesteren.nl/>
<http://www.opera.com/>






      ____________________________________________________________________________________
You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.  
http://tc.deals.yahoo.com/tc/blockbuster/text5.com
Received on Monday, 7 April 2008 00:12:46 GMT

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