-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Safari Support #27
Comments
Unfortunately I don't have access to Safari. Can you at least share complete example via, say, jsfiddle? |
In Safari 9.1, I get
on |
@tsayen Is this the same problem I'm experiencing in Firefox? No error in Chrome though. My page imports google fonts - and I get |
@kirilledelman I think your issue is the same as #13 |
Hi tsayen. I've been developing a functionality similar to this repo and meet the same problem. Pseudo code is like this: var canvas1 = document.getElementById("canvas-id");
var myImage = canvas1.toDataURL("image/png"); Canvas is generated by html2canvas and not tainted by cross-origin images. I googled about this and find nothing useful. Do you have any clue? |
In Cordova iOS I am also getting this event error. After investigation, it appears that it is thrown by
When this error occurs, the Note that I get this behavior only in a Cordova context and not when using Safari over HTTP. In Cordova, all resources are embedded in the application and served through When I test the same code served by HTTP I get the I keep investigating to understand why I don't get the same behavior. |
The reason for the SecurityError is the canvas getting tainted in Safari. Apparently in Safari whenever a As the canvas is drawn with this foreignObject the origin-clean flag is set to false and the canvas is hence being shown to be tainted. From a tainted canvas when the toDataURl function is called the Security Error is encountered. https://html.spec.whatwg.org/multipage/scripting.html#security-with-canvas-elements |
@tsayen Do you have any opinion regarding how this issue may be addressed |
+1
|
Don't know if it's fixed since then, but I tried this package on Safari 12.0 (MacOS Mojave 10.14) and it's working perfectly. My tag img is nicely created with no glitch or something else :) Just to let you know |
Works perfectly on Safari 12.1 (macOS Mojave 10.14.4) |
Still facing the issue in Safari 12.1. Any workarounds?? |
I managed to successfully create PNG on safari 14.0 (on both desktop & iOS), which came out last september! I hope I'm not the only one. |
Safari supports |
Can you please let us know how you solve the problem, so that we can check and fix the problem in our end. |
I got Event error when I run it on Safari 8.0.7
the function I ran is like the following
The text was updated successfully, but these errors were encountered: