javascript - html2canvas + FileSaver browser issues -


i'm working html2canvas , filesaver, save generated canvas when button clicked. dialog popup , user can choose save image , rename if wish. works perfectly... in firefox. can't seem work in either chrome, ie, or safari.

the html2canvas part, , create image out of div in of browsers. filesaver dialog box thing not work in aforementioned browsers.

any ideas? i've attached script. can see full working code here: https://jsfiddle.net/ticklishoctopus/556etja4/

script (with previous posts):

$(function () {     $("#btnsave").click(function () {        html2canvas($("#testbtn"), {            onrendered: function (canvas) {                thecanvas = canvas;                document.body.appendchild(canvas);                 canvas.toblob(function (blob) {                    saveas(blob, "testimage.jpg");                });             }          });      }); }); 

realised toblob not supported in chrome. use instead: possible solution


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo