Modernizr—the frontend developer's Swiss army knife
The web community's ability to figure out the many and varied issues of cross browser compatibility and create solutions for mere mortals like myself never ceases to amaze and delight me. Modernizr was mentioned briefly in Chapter 4, HTML5 for Responsive Designs and again in the last chapter. To reiterate, Modernizr is an open source JavaScript library that feature tests a browser's capabilities. Fauk Ateş wrote the first version, and the project now also includes Alex Sexton and the incredibly talented Paul Irish as the lead developer. It's a tool of choice for a few companies you may have heard of—Twitter, Microsoft, and Google. I mention this not merely to blow smoke up the Modernizr team (although they certainly deserve it) but more to illustrate that this isn't merely today's great piece of JavaScript. Put bluntly, it's a tool that is worth understanding.
So what does it actually do? How does it enable us to both polyfill older browsers...