Reputation: 2008
I'm trying to get Internet Explorer Mobile 7 to display Canvas.
I have used ExplorerCanvas and the page works in IE7 (as I understand IE Mobile 7 is based on IE7).
Here is the code:
<html>
<head>
<title>Canvas Test</title>
<script type="text/javascript" src="excanvas.js"></script>
<script type="text/javascript">
window.onload = function() {
var canvasElement = document.getElementById("canvas");
var context = canvasElement.getContext("2d");
context.fillStyle = "blue";
context.fillRect(20,20,20,20);
}
</script>
</head>
<body>
<canvas id="canvas" width="100" height="100"/>
</body>
</html>
Is it possible to get this to work on WP7?
Upvotes: 1
Views: 900
Reputation: 64561
Just stumbled on that article saying WP 7.1 will have a new browser based on IE9, with support for canvas: http://www.wintellect.com/CS/blogs/jprosise/archive/2011/07/14/building-cross-platform-mobile-applications-with-html5-and-mango.aspx
Upvotes: 1
Reputation: 16826
Windows Phone 7 does not support HTML5 and any possible manual implementation (e.g. through JavaScript) is not guaranteed to work. In your case, you are using the CANVAS
tag - and it is not supported. IE on Windows Phone 7 is more like IE 7.5 (with features both from IE7 and IE8) - but this is only a subset available on the mobile device. IE on WP7 != IE on Windows.
Upvotes: 2