Can someone help me understand why chrome might raise a security exception when I load this page from the local filesystem? Opera and Firefox don't have a problem and from what I've read the origin-clean flag should still be true.
<html>
<head>
<title>Canvas Test</title>
<script type="text/javascript">
var canvas = document.createElement("canvas");
canvas.setAttribute("width", 100);
canvas.setAttribute("height", 100);
var myImage = new Image();
myImage.src = "gradient-1.png";
function draw(){
document.body.appendChild(canvas);
var ctx = canvas.getContext("2d");
ctx.drawImage(myImage, 0, 0, 100, 100);
data = canvas.toDataURL("image/png");
// Chrome says Uncaught Error: SECURITY_ERR: Dom Exception 18
}
</script>
</head>
<body onload="draw()">
</body>
</html>