Originariamente inviato da cavicchiandrea
Io con firefox 15 non vedo nulla tranne lo sfondo
Perchè non hai l'immagine nella cache, lo script non attende il caricamento...
codice:
<script type="text/javascript">
function draw()
{
var canvas = document.getElementById('my_canvas');
var img = new Image();
img.src = 'screen0.jpg';
img.onload=function(){
if (canvas.getContext){
var ctx = canvas.getContext('2d');
ctx.drawImage(img,0,0);
//ctx.fillStyle = "rgba(0,0,0,38)";
//ctx.fillRect(0,canvas.height-80,canvas.width,80);
}
}
}
</script>