I am able to download an image in Chrome & Firefox using the code below but in Safari it's throwing this error:
(我可以使用以下代码在Chrome和Firefox中下载图片,但在Safari中会抛出此错误:)
TypeError: 'undefined' is not a function (evaluating 'canvas.toBlob(blobCallback('wallpaperdeae'))')
(TypeError:'undefined'不是一个函数(评估'canvas.toBlob(blobCallback('wallpaperdeae'))'))
$("#save").click(function(){
function blobCallback(iconName) {
return function (b) {
var a = document.getElementById('download');
a.download = iconName + ".jpg";
a.href = window.URL.createObjectURL(b);
}
}
canvas.toBlob(blobCallback('wallpaperdeae'));
});
ask by Bikshu s translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…