4 ms·
What I want to see is a drop-in JavaScript library that makes many of the new HTML5 elements, attributes, etc. backwards-compatible with all common browsers sta
by philfreo 16y ago
What I want to see is a drop-in JavaScript library that makes many of the new HTML5 elements, attributes, etc. backwards-compatible with all common browsers starting with IE6.
E.g., I want to say <input type="text" placeholder="What is your username?" /> and have a script that detects if the browser supports the placeholder attributes, and if not, simulates it transparently.
I'd happily understand/accept if this script was limited, so long as it had good clean documentation of what it supported (like placeholder).
- jsdalton 16y agoModernizr (http://www.modernizr.com/ http://www.modernizr.com/) is as close as you're going to get at the moment. It's pretty solid.
- philfreo 16y agoThis is actually specifically NOT want I want: "Modernizr does not add missing functionality to browsers; instead, it detects native availability of features and offers you a way to maintain a fine level of control over your site regardless of a browser’s capabilities." I understand that not all HTML5 features can be reproduced in JS, but for the ones that can (such as "placeholder"), I don't want to have to think about reimplementing it for older browsers when it could be done automatically.