mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
bug fixes
This commit is contained in:
parent
4579fb25c6
commit
3d7a6374ad
@ -213,6 +213,7 @@ _html2canvas.Util.Children = function(el) {
|
||||
var children;
|
||||
try {
|
||||
children = $(el).contents();
|
||||
// children = (el.nodeName && el.nodeName.toUpperCase() === "IFRAME") ? el.contentDocument || el.contentWindow.document : Array.prototype.push.call([], el.childNodes );
|
||||
} catch (ex) {
|
||||
h2clog("html2canvas.Util.Children failed with exception: " + ex.message);
|
||||
children = [];
|
||||
|
@ -213,12 +213,13 @@ _html2canvas.Preload = function( options ) {
|
||||
// TODO Opera has no load/error event for SVG images
|
||||
|
||||
// Opera ninja onload's cached images
|
||||
/*
|
||||
window.setTimeout(function(){
|
||||
if ( img.width !== 0 && imageObj.succeeded === undefined ) {
|
||||
img.onload();
|
||||
}
|
||||
}, 100); // needs a reflow for base64 encoded images? interestingly timeout of 0 doesn't work but 1 does.
|
||||
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
@ -59,7 +59,7 @@ _html2canvas.Renderer = function(parseQueue, options){
|
||||
|
||||
sortZ(parseQueue.zIndex);
|
||||
if ( typeof options.renderer._create !== "function" ) {
|
||||
throw Error("Invalid renderer defined");
|
||||
throw new Error("Invalid renderer defined");
|
||||
}
|
||||
return options.renderer._create( parseQueue, options, document, queue, _html2canvas );
|
||||
|
||||
|
@ -219,7 +219,7 @@ html2canvas.Renderer.Canvas = function( options ) {
|
||||
|
||||
return canvas;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return methods;
|
||||
|
||||
|
@ -3,7 +3,10 @@
|
||||
<head>
|
||||
<script type="text/javascript" src="test.js"></script>
|
||||
<script type="text/javascript">
|
||||
function setUp(){
|
||||
h2cSelector = '#bar';
|
||||
}
|
||||
|
||||
</script>
|
||||
<title>
|
||||
display/box/float/clear test
|
||||
|
@ -14,10 +14,12 @@ var h2cSelector, h2cOptions;
|
||||
document.write(scrStart + '../src/' + html2canvas[i] + '.js' + scrEnd);
|
||||
}
|
||||
window.onload = function() {
|
||||
h2cSelector = [document.body];
|
||||
|
||||
if (window.setUp) {
|
||||
window.setUp();
|
||||
}
|
||||
h2cSelector = [document.body];
|
||||
|
||||
setTimeout(function() {
|
||||
|
||||
$(h2cSelector).html2canvas($.extend({
|
||||
|
Loading…
Reference in New Issue
Block a user