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

Re: [SelectorsAPI] Selector detection needed?

From: Anne van Kesteren <annevk@opera.com>
Date: Mon, 07 Apr 2008 15:24:10 +0200
To: "Daniel Glazman" <daniel.glazman@disruptive-innovations.com>, www-style@w3.org
Message-ID: <op.t88sukbi64w2qv@annevk-t60.oslo.opera.com>

On Mon, 07 Apr 2008 15:16:48 +0200, Daniel Glazman  
<daniel.glazman@disruptive-innovations.com> wrote:
> Anne van Kesteren wrote:
>
>> There's no reason you couldn't do it on an empty document  
>> (document.implementation.createDocument() iirc).
>
> It's still an awful hack. Urgh, to say the least. It's like saying
> |try { foo() } catch(e) { /* not implemented */ }| is better than
> |if (typeof foo != "function") { /* same */ }|.

I don't expect authors to do this. I expect them to simply code against  
what the user agent supports they're developing for. (Which is what I  
would do too, admittedly.)


>> It's also not clear what advantage there is trying to feature detect  
>> first. As we know from hasFeature() and all similar mechanisms, user  
>> agents lie because of unknown bugs, because they need to get some page  
>> to work, et cetera.
>
> s/cetera/cætera/ :-)
>
> Anne, you really think we discover this _now_ ? I have always hated this
> answer to this question because basically we decide not to implement
> something because we feel implementors won't implement correctly...
> That's called a free-hand. A license to kill if you prefer.

I'd call it a design principle. :-) I think it's a rather good one.


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>
Received on Monday, 7 April 2008 13:24:33 GMT

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