[英]html2canvas.js not Working in IE9/10/11
We want to capture screenshot of Div (HTML element) which is inside an IFrame. 我们想要捕获IFrame内部的Div(HTML元素)的屏幕截图。 IFrame loads inside another Div at runtime in a html page. IFrame会在运行时在HTML页面中加载到另一个Div中。 For capturing screenshot we are using html2canvas.js API. 为了捕获屏幕截图,我们使用html2canvas.js API。
Code is working very well with Mozilla and Chrome but not working in IE9/10/11. 代码在Mozilla和Chrome上运行良好,但在IE9 / 10/11中却无法运行。
The basic requirement is that to capture screenshot of Div and send that image byte-array to Flex application. 基本要求是捕获Div的屏幕截图并将该图像字节数组发送到Flex应用程序。
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: IE中的错误:
SCRIPT438: Object doesn't support property or method 'getComputedStyle' File: html2canvas.js, Line: 2269, Column: 5 SCRIPT438:对象不支持属性或方法“ getComputedStyle”文件:html2canvas.js,行:2269,列:5
Please let me know if anyone had similar experience or has any clue in resolving the issue. 如果有人有类似经验或解决问题的任何线索,请告诉我。
根据这个gitHub问题 (似乎由您填补),您不应同时使用proxy
和useCORS
属性。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.