Tainted canvases may not be exported

后端 未结 10 1562
被撕碎了的回忆
被撕碎了的回忆 2020-11-22 05:21

I want to save my canvas to a img. I have this function:

function save() {
    document.getElementById(\"canvasimg\").style.border = \"2px solid\";
    var d         


        
10条回答
  •  时光取名叫无心
    2020-11-22 05:52

    I also solved this error by adding useCORS : true, in my code like -

    html2canvas($("#chart-section")[0], {
            useCORS : true,
            allowTaint : true,
            scale : 0.98,
            dpi : 500,
            width: 1400, height: 900
        }).then();
    

提交回复
热议问题