I'm trying to save a SVG from a canvas as PNG file using javascript. The below code seems to work fine on Chrome and Firefox, but in IE 10 i get the below error in my console.
SCRIPT5: Access is denied.
FInd below the code that I've used:
var image = canvas.toDataURL("image/png").replace("image/png", "image/octet-stream");
var a = $('<a>').attr("href", canvas.toDataURL("image/png")).attr("download", title + "png").appendTo($('#VisitsContainer'));
a[0].click();
a.remove();
The console points to the click event that I'm trying to invoke.
See Question&Answers more detail:os