我正在尝试在myownradar.alerteagle.com/comp/800x500/north_carolina.gif上叠加radarchive.neocities.org/legend.png
<html>
<head>
<title>Canvas</title>
</head>
<body>
<img style="position: relative; top: 0; left: 0;" src="http://myownradar.alerteagle.com/comp/800x500/north_carolina.gif">
<img style="position: absolute; top: 8; left: 200;" src="http://radarchive.neocities.org/legend.png">
<script src="https://rawgit.com/niklasvh/html2canvas/master/dist/html2canvas.min.js"></script>
<script>
html2canvas( [ document.body ], {
taintTest: false
}).then(function(canvas) {
var img = canvas.toDataURL("image/png");
document.write('<img src="' + img + '" width="800" height="500"/>');
});
</script>
</body>
此处的输出http://radarchive.neocities.org/canvas.html
代码没有将图像url写入页面。
我是否需要使用taintTest函数?