Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tainted canvases may not be exported. #1

Open
xingkong15920 opened this issue May 18, 2018 · 1 comment
Open

Tainted canvases may not be exported. #1

xingkong15920 opened this issue May 18, 2018 · 1 comment

Comments

@xingkong15920
Copy link

canvas2image.js:185 Uncaught (in promise) DOMException: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.
报这个错误,求解

@jczzq
Copy link
Owner

jczzq commented May 18, 2018

可能是你渲染了跨域的图片,canvas渲染跨域图片有限制,详情请参考
https://segmentfault.com/q/1010000004006610
img.crossOrigin = "Anonymous";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants