This blog is dedicated to considerate web design. Considerate Web Design refers to the practice of designing for the web with consideration to its intended audience and the devices used to access it. As the processing power and display capabilities of mobile devices have increased significantly over the last couple of years, it has become the responsibility for web designers to change their practices to consider these devices and their new capabilities.
Wednesday, 15 August 2012
As promised the skeleton code for the HTML5 Canvas detection
Due to time constraints in class I could not wait for everyone to take this down, so as promised, here is the skeleton code for the HTML5 Canvas detection. Please note: 1) I am expecting you to expand on this code and to communicate the browser's possible lack of capabilities clearly to your user.
2) You need to make sure to reference your Modernizr that you downloaded as it might be a different version and have a different path!
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>HTML5 capability detections</title>
<script type="text/javascript" src="js/modernizr.custom.78490.js"></script>
</head>
<body>
<noscript>
Sorry, but you need JavaScript enabled!
</noscript>
<script type="text/javascript">
if (Modernizr.canvas) {
alert("Canvas ready");
} else {
alert("no Canvas support");
}
</script>
</body>
</html>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment