Appendix A. Modernizr
Modernizr is an open-source JavaScript library that enables us to test for individual features of HTML5, CSS3, and some APIs in our users’ browsers. Instead of testing solely for a particular browser and trying to make decisions based on that, Modernizr allows us to ask specific questions such as “does this browser support geolocation?” and receive a clear “yes” or “no” answer. Modernizr does this by feature detection: checking whether the browser that our user is currently utilizing supports a given feature.
The first step to using Modernizr is to download it from the website, where it’s recommended that you begin with the Development version—we agree! This version will test for every single feature of HTML5, CSS3, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access