I am capturing the screenshot of the Scorm content present inside the iframe, I am getting screenshot in the firefox but not in chrome, it seems like issue is with images path/url while rendering into the canvas.
I have compared the result of logging: true from both browser.
And I found that images path in the chrome is changed that's why it is not working in chrome.
How can i solve this? help me........
var iframeEle = document.querySelector("iframe").contentWindow.document.body;//working
console.log(iframeEle);
// $('#saveReport').on('click', function(){
html2canvas(iframeEle, {
//background: '#fff',
// height: window.innerHeight,
//windowHeight: window.innerHeight,
logging: true,
onrendered: function(canvas){
// before_imgData = canvas.toDataURL('image/png');
before_imgData = canvas.toDataURL('image/jpeg');
}
});
Log for firefox browser :
when I checked path of images for rendering it is correct.

Log for chrome browser :
in chrome the path for images is not right as it consist of current url of browser thats why is not capturing correctly.
I think it is issue of relative path for chrome and not for firefox.