简体   繁体   中英

html2canvas.js not Working in IE9/10/11

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.

根据这个gitHub问题 (似乎由您填补),您不应同时使用proxyuseCORS属性。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM