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.
views:
20answers:
1
+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
2010-09-30 22:01:56
Ah. That's really clever. (:
peirix
2010-10-01 07:31:58