I have single html page on this page I am just trying to download the canvas but getting this
, I have also tried this but no luck ,also I cannot set CORS policy because there no web framework behind
$("#download" ).click(function() {
console.log( "Handler for .click() called." );
var link = document.createElement('a');
link.download = 'image.bmp';
link.href = document.getElementById('myCanvas').toDataURL();
link.click();
});