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

offline export : img.crossOrigin = 'Anonymous' fails on older versions of Firefox #4861

Closed
jlowcs opened this issue Dec 17, 2015 · 4 comments
Assignees

Comments

@jlowcs
Copy link

jlowcs commented Dec 17, 2015

Tested with FF v39: img.crossOrigin = 'Anonymous' results on a failed export (img.onerror is called).

Why this option ?

@oysteinmoseng
Copy link
Member

The property is set because of CORS issues with drawing to canvas in some browsers. Will look into not setting it for older FF.

Would you happen to have a jsFiddle demo for testing?

Edit: FF v39 seems to require this option at least in order not to break on SVG with cross domain images embedded. In which use case did it break things?

@jlowcs
Copy link
Author

jlowcs commented Jan 4, 2016

It was a PNG export without CORS.

Edit: PNG export fails on your client side jsfiddle with FF 39 (uncaught exception: Fallback to export server disabled)

@oysteinmoseng
Copy link
Member

I revamped the logic to now always try without crossOrigin='Anonymous' first, and then retry with the property set if it fails with security errors.

@jlowcs
Copy link
Author

jlowcs commented Jan 12, 2016

👍

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