-
Notifications
You must be signed in to change notification settings - Fork 219
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
Security errors when attempting to save a captured canvas as a PNG file in Edge browser #169
Comments
Hey, all browser's are taking precautions not to leak any information from the user's browsing context from the interpreted HTML. Firefox and Chrome handle this well, WebKit throws a hard error when reading from the canvas. I haven't looked into Edge much, so I can't tell for sure, but I'm assuming that this is a similar issue. If you are interested in finding out more, you could go step by step, by
Then let's see how that goes. |
Thanks for the response! I've tried painting a simple SVG by calling fillRect() on the canvas. Calling getImageData() on the canvas works in Microsoft Edge. Sorry, I'm not 100% sure what you mean by 'rendering a SVG with an empty' - could you clarify? |
Sorry, Github might have swallowed the foreignObject tag. Can you try with
this?
|
I have an example on JSFiddle https://jsfiddle.net/1erhqu15/ that captures the document, crops it and then saves it as a PNG file. This works fine in Chrome & Firefox, but in Microsoft Edge I get a 'Security Error' thrown when getImageData() is called on the context of the canvas. Similarly, getImageData() throws a 'The operation is insecure' error when run on Safari V10.
Any thoughts on what could be causing the error?
Thanks,
Chris
The text was updated successfully, but these errors were encountered: