I was trying to draw an image (png-file) to a to act as a background-image and I do not know why the js i have thus far is not working.
Here's what I have:
var canvas = document.getElementById('hplogo-z');
var cnvs = canvas.getContext('2d');
background = new Image();
background.onload = function(){
cnvs.drawImage(background, x, y);
}
background.src = 'bg.png';
Any ideas on what I am doing wrong?