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
Post a Comment