我试图在画布上绘制动画,但出现此错误“画布已被跨域数据污染”。

时间:2018-11-25 17:40:15

标签: javascript canvas

chrome DevTools中的完整错误

nectar-particlesbd20.js?ver=8.0:1200
 Uncaught DOMException: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The canvas has been tainted by cross-origin data.
    at Object.drawImageToBackground (file:///C:/Users/hovorun/Desktop/site%20original/phore.io/wp-content/themes/salient/js/nectar-particlesbd20.js?ver=8.0:1200:50)
    at Object.callDrawImageToBackground (file:///C:/Users/hovorun/Desktop/site%20original/phore.io/wp-content/themes/salient/js/nectar-particlesbd20.js?ver=8.0:1130:27)
    at Image.bgImage.(anonymous function).onload (file:///C:/Users/hovorun/Desktop/site%20original/phore.io/wp-content/themes/salient/js/nectar-particlesbd20.js?ver=8.0:782:23)
<br>

这是我的代码,我不能在这里放它,因为有太多的字母 请向我解释我在做什么错

https://pastebin.com/W5Ykt5AV

0 个答案:

没有答案