Re: [SelectorsAPI] Selector detection needed?

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 UTC