Pergunta

In my app I am trying to convert an image to canvas. What I am doing is this.

I am trying to upload image from an external server and when this thing is done if the height of the image is greater then its width I am drawing it on canvas and rotating it.

It is working great in Chrome and FF but in Safari I am getting this error

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

I am not getting what this is. Can anybody let me know about this?

Foi útil?

Solução

Try finding the exact line that is breaking. When safari is set Always block cookies and other website data then it breaks local storage, and several of the image manipulation APIs. You might try to determine exactly which line is failing, and wrap that line in a try/catch.

enter image description here

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top