mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Fix Firefox DOM clone not being ready
This commit is contained in:
parent
85b77ca49f
commit
3101f2007a
@ -113,7 +113,15 @@ function createWindowClone(ownerDocument, width, height, options) {
|
|||||||
if (options.type === "view") {
|
if (options.type === "view") {
|
||||||
container.contentWindow.scrollTo(window.pageXOffset, window.pageYOffset);
|
container.contentWindow.scrollTo(window.pageXOffset, window.pageYOffset);
|
||||||
}
|
}
|
||||||
resolve(container);
|
|
||||||
|
var timeout = setTimeout(function() {
|
||||||
|
resolve(container);
|
||||||
|
}, 100);
|
||||||
|
|
||||||
|
container.contentWindow.onload = function() {
|
||||||
|
clearTimeout(timeout);
|
||||||
|
resolve(container);
|
||||||
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
4
build/html2canvas.min.js
vendored
4
build/html2canvas.min.js
vendored
File diff suppressed because one or more lines are too long
10
src/core.js
10
src/core.js
@ -104,7 +104,15 @@ function createWindowClone(ownerDocument, width, height, options) {
|
|||||||
if (options.type === "view") {
|
if (options.type === "view") {
|
||||||
container.contentWindow.scrollTo(window.pageXOffset, window.pageYOffset);
|
container.contentWindow.scrollTo(window.pageXOffset, window.pageYOffset);
|
||||||
}
|
}
|
||||||
resolve(container);
|
|
||||||
|
var timeout = setTimeout(function() {
|
||||||
|
resolve(container);
|
||||||
|
}, 100);
|
||||||
|
|
||||||
|
container.contentWindow.onload = function() {
|
||||||
|
clearTimeout(timeout);
|
||||||
|
resolve(container);
|
||||||
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user