views:

20

answers:

1

Well, that's pretty much my whole question. I can see how they check for CSS3-support, trying to fetch style.borderRadius and such to see if the browser knows what the heck is going on. But since most browsers will let the attribute stay (<input type="date">), but still not support it fully, I can't understand how they do their magic.

+1  A: 

For each input type it's different, mostly: http://github.com/Modernizr/Modernizr/blob/master//modernizr.js#L699-751

I think the inline comments describe the considerations for each, so... I'll direct you there. :)

But the first thing we do is do elem.value = ':)' and see if that sticks. If it does, then it's an indication the feature isn't in place.

Paul Irish
Ah. That's really clever. (:
peirix