SECURITY_ERR: DOM 18 exception ONLY in Safari when using canvas.toDataURL ("image / png")

In my application, I am trying to convert an image to canvas. What I do is this.

I am trying to download an image from an external server, and when this thing is done, if the image is larger than its width, I draw it on the canvas and rotate it.

It works fine in Chrome and FF, but in Safari I get this error

SECURITY_ERR: DOM Exception 18: An attempt was made to break through the user agent security policy.

I don’t understand what it is. Can someone tell me about this?

+4
source share
1 answer

, . . cookie -, API- . , , try/catch.

enter image description here

-1

Source: https://habr.com/ru/post/1540656/


All Articles