Skip to content

Commit ae9058d

Browse files
committed
Update html2canvas-0.4.1.html
1 parent 1498722 commit ae9058d

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

examples/html2canvas-0.4.1.html

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</head>
2525
<body>
2626
<div id="container">
27-
<h1>html2canvas 1.x with PHP proxy</h1>
27+
<h1>html2canvas 0.4.1 with PHP proxy</h1>
2828

2929
<p>
3030
From imgur.com: <br>
@@ -45,27 +45,29 @@ <h2>Output results:</h2>
4545

4646
<script>
4747
window.onload = function () {
48-
html2canvas(document.getElementById("container"), {
49-
"logging": true, //Enable log (use Web Console for get Errors and Warnings)
50-
"proxy": "../html2canvasproxy.php",
51-
"onrendered": function (canvas) {
52-
var img = new Image;
48+
setTimeout(() => {
49+
html2canvas(document.getElementById("container"), {
50+
"logging": true, //Enable log (use Web Console for get Errors and Warnings)
51+
"proxy": "../html2canvasproxy.php",
52+
"onrendered": function (canvas) {
53+
var img = new Image;
5354

54-
img.onload = function () {
55-
img.onload = null;
55+
img.onload = function () {
56+
img.onload = null;
5657

57-
document.getElementById("output").appendChild(img);
58-
};
58+
document.getElementById("output").appendChild(img);
59+
};
5960

60-
img.onerror = function () {
61-
img.onerror = null;
61+
img.onerror = function () {
62+
img.onerror = null;
6263

63-
console.log("Not loaded image from canvas.toDataURL");
64-
};
64+
console.log("Not loaded image from canvas.toDataURL");
65+
};
6566

66-
img.src = canvas.toDataURL("image/png");
67-
}
68-
});
67+
img.src = canvas.toDataURL("image/png");
68+
}
69+
});
70+
}, 5000);
6971
};
7072
</script>
7173
</body>

0 commit comments

Comments
 (0)