jquery - html2canvas - SecurityError: The operation is insecure -


i have used html2canvas.js in project convert element(body) canvas , convert canvas image. element contains images load cross domain. canvas create element working perfectly, when try canvas.todataurl("image/png"); gives error securityerror: operation insecure please me solve issue. canvas.todataurl("image/png"); working fine when image not load cross domain.

thanks in advance.

not html2canvas issue--just security issue.

if lucky...

you can use imageobject.crossorigin='anonymous' when downloading cross domain image. requires both server , browser allow anonymous x-domain transfers. sadly, servers , browsers don't yet allow.

alternatively

don't go cross-domain...serve image on own website.

alternatively

wrap image request in json request. here's script that: http://www.maxnov.com/getimagedata/


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -