html2canvas不支持ie,javascript - html2canvas.js not Working in IE9/10/11 - Stack Overflow

忘是亡心i 2022-10-07 12:46 180阅读 0赞

We want to capture screenshot of Div (HTML element) which is inside an IFrame. IFrame loads inside another Div at runtime in a html page. For capturing screenshot we are using html2canvas.js API.

Code is working very well with Mozilla and Chrome but not working in IE9/10/11.

The basic requirement is that to capture screenshot of Div and send that image byte-array to Flex application.

Function which captures screenshot is:

function capturImage() {

html2canvas(document.getElementById(‘map_canvas’), {

proxy: “server.js”,

useCORS: true,

onrenderd: function (canvas) {

var imageData = canvas.todataURL(‘image/png’, 1.0);

imageDataOnly = imageData.split(“,”);

falshObj.getImage(imageDataOnly[1]);

}

});

}

Error In IE:

SCRIPT438: Object doesn’t support property or method

‘getComputedStyle’ File: html2canvas.js, Line: 2269, Column: 5

Please let me know if anyone had similar experience or has any clue in resolving the issue.

发表评论

表情:
评论列表 (有 0 条评论,180人围观)

还没有评论,来说两句吧...

相关阅读