Awesome-qr.js icon indicating copy to clipboard operation
Awesome-qr.js copied to clipboard

SecurityError while using it with the browser

Open rbalet opened this issue 3 years ago • 0 comments

Description

I know this isnt't a awesome-qr.js specific error, but it could be useful to add it in the documentation.

Error

When using the code in the browser, I get the following error

ERROR Error: Uncaught (in promise): SecurityError: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.
Error: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.

This is du to the cross-origin use of images and canvas https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image

rbalet avatar Sep 10 '21 09:09 rbalet