html2canvas.js not Working in IE9/10/11

我只是一个虾纸丫 提交于 2019-12-23 01:19:30

问题


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.


回答1:


According to this gitHub issue (that seems to be filled by you), you should not use the proxy and the useCORS properties at the same time.



来源:https://stackoverflow.com/questions/24660102/html2canvas-js-not-working-in-ie9-10-11

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!