Re: Feature detection (was: <details>)

Anne wrote:
> One thing I'm afraid of is that if people start using <details>  
> before implementations are ready is that implementations can no  
> longer provide the functionality of <details> natively. From that  
> perspective I'm sort of happy authors cannot use it yet.

That's a fair point but that's going to be true of any new element  
that adds functionality.

As James said:
> it applies to any other markup introduced in HTML5 that is intended  
> to alter browser behavior e.g. an author could use <input  
> type="color"> with a javascript widget

Toby wrote:
> This would be a reason to add <script implements> to HTML5

This strikes me as overly-complex and I agree with Anne that:
> The design of this construct does not seem resilient against the  
> copy-and-paste cargo-cult pattern.

But the issue of feature detection is an important one.

The latest instalment of Mark Pilgrim's Dive Into HTML5 deals with  
this very issue:
http://diveintohtml5.org/detect.html

The fact that feature detection is already being abstracted into third- 
party scripts like Modernizr bodes well:

http://www.modernizr.com/

In conclusion, while I share Anne's concern about usage outpacing  
implementation, I'm reassured by the fact that authors are already  
thinking about robust feature detection.

-- 
Jeremy Keith

a d a c t i o

http://adactio.com/

Received on Monday, 14 September 2009 14:44:55 UTC