1
I wish I knew what I’m doing wrong here...
<script type="text/javascript">
function draw() {
if (!Modernizr.canvas) return; {
var canvas = document.getElementById("mycanvas");
var ctx = canvas.getContext("2d");
ctx.fillStyle = "#ff0000";
ctx.fillRect(10, 10, 200, 100);
}
window.addEventListener("load", draw, false);
}
</script>
<canvas id="mycanvas"></canvas>
Your browser supports canvas?
– Oralista de Sistemas