We have already had a glimpse of Modernizr in the last chapter, it's a library that does plenty of things, some of which are listed as follows:
It adds support for new HTML5 tags in older browsers.
It exposes some methods in JavaScript allowing us to test for a certain CSS3/HTML5 feature. For example,
Modernizr.multiplebg
returnstrue
orfalse
depending on the support of multiple backgrounds.It adds some classes to the
<html>
element reflecting the support of certain CSS3/HTML5 features. For example,<html class="multiplebg">
or<html class="no-multiplebg">
depending on the support of multiple backgrounds.
We have already added this library to our project. However, if not properly tuned, Modernizr performs all the tests to detect the supported features even if we're not going to use them. To enhance the performance of the library, we can select which tests we want it to perform.
To do that, we have to click on the download page of Modernizr (http...