I'm currently using modernizr to detect HTML5 support in browsers. The script that I'm using looks like this:
<script type="text/javascript">
$(document).ready(function() {
if (Modernizr.canvas) {
// HTML supported browser
alert("HTML5 Supported!");
} else {
// Not HTML5 supported browser
alert("Looks like you haven't downloaded chrome yet...");
}
});
</script>
And that's obviously after including Jquery-1.9.1. and modernizr.js. When I test in chrome or even IE8 the evaluation always returns as true. When it really shouldn't in IE's case. When I look at my console I get this error:
Uncaught TypeError: Cannot read property 'msie' of undefined
I've read up on that and the reason being is that '$.browser' has been removed in jQuery 1.9. So what I'm concluding here is that modernizr is still relying on that jQuery function that has been deprecated, am I correct?
In either case, a point in the right direction would be great. I don't even have to use modernizr, I just need a way for checking for html5 support.