Skip to content

SecurityError while using it with the browser #66

@rbalet

Description

@rbalet

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions