The first 21 lines.
HTML5 features are supported in which browsers, and that's a very important thing to do when
you're making decisions about how you're going to build your project. But sometimes you want
to check those things at runtime, and that's where a library called Modernizr is really useful.
It allows you to runtime check to see if a certain feature is supported, and if it's
not, you can provide some type of fallback feature and this is known as Progressive Enhancement.
you can download either the Developement version of Modernizr, and that's just the JavaScript
file or a Production build, and this allows you to configure which features you want to include.
So if I click on that I can actually select just the features that I want to test for
and it's obviously going to create a much smaller file.
But while you're doing development, you can just get the Development version which includes
everything and it's actually uncompressed.
So if I click on that, we can see it just opens here in Chrome and what I want to do
is to save this file, so I'm going to hit Command+S and I'm just going to save it to
the Desktop, and I'm just going to remove the version number here, so it's just going to be modernizr.js.
So when we're finished, you should now have that modernizr.js
saved on your Desktop.
So now back in Sublime Text, I have again just re-created our default HTML5 template
here, saved it as demo.html on the Desktop.
So what I want to do now, is at the top here, is to include that modernizr JavaScript file.
So again, I'm going to type script and hit Tab, provide a source attribute here and I'm
going to load that in so modernizr.js.
No comments yet. Be the first to leave one.