I have gone over multiple times this js…looks fine to me. & console is not giving any errors. is there a typo I am just blind to?
in the php
<canvas id="canvas1" class="canvas1" width="350" height="400">
</canvas>
& the js
window.onLoad= function(){
var canEl = document.getElementById('canvas1');
if(canEl && canEl.getContext){
var ctx = canEl.getContext("2d");
if(ctx){
ctx.fillStyle = "#000";
ctx.fillRect(0,0, ctx.canvas.width, ctx.canvas.height);
}
}
}