I'm new to web development and am trying to add a clear canvas feature to a drawing application. The app's in HTML5 with Firebase as a backend.
Right now I have this in JS:
function clearCanvas() {
// clear the canvas
myCanvas.clearRect(0, 0, myCanvas.width, myCanvas.height);
// removes the pixel data from firebase
pixelRefData.remove();
}
And this in HTML5:
<button onclick= "clearCanvas()"> Clear <button>
Yet whenever I click the "clear" button when I test, nothing is ever cleared. Help?