Customizing the HTML5 checks Modernizr does
Wednesday 09 November 2011
Adding custom checks
Adding a test this way automatically adds both the test itself and the extra CSS classes to the <html> element.
Adding custom scripts
Another nice capability of Modernizr, actually implemented using yepNope.js, is the capability to conditionally load extra scripts. A great way to load HTML 5 polyfills for missing pieces in specific browsers.
An example, taken from the Modernizr, loading a geo location polyfill for those browser that don’t support geo location out of the box.
Modernizr is a must have in your HTML 5 arsenal.