Q:

Something wrong with code

var image = new Image();
image.src = canvas.toDataURL("image/png");
var link = document.createElement('a');
link.href = image;
link.download = 'Download.png';
document.body.appendChild(link);
link.click();

When I use this script it returns me a download error
(File not found)

Why?

A:

change 
link.href = image;
to
link.href = image.src;

