Skip to content

Commit 2e494bd

Browse files
committed
moved common code into tests/test.js
1 parent 753ab77 commit 2e494bd

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

tests/test.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
html2canvas @VERSION@ <http://html2canvas.hertzen.com>
3+
Copyright (c) 2011 Niklas von Hertzen. All rights reserved.
4+
http://www.twitter.com/niklasvh
5+
6+
Released under MIT License
7+
*/
8+
(function(document, window) {
9+
var scrStart = '<script type="text/javascript" src="', scrEnd = '"></script>';
10+
document.write(scrStart + '../external/jquery-1.6.2.min.js' + scrEnd);
11+
var html2canvas = ['Core', 'Generate', 'Parse', 'Preload', 'Queue', 'Renderer', 'plugins/jquery.plugin.html2canvas'], i;
12+
for (i = 0; i < html2canvas.length; ++i) {
13+
document.write(scrStart + '../src/' + html2canvas[i] + '.js' + scrEnd);
14+
}
15+
window.onload = function() {
16+
if (window.setUp) {
17+
window.setUp();
18+
}
19+
setTimeout(function() {
20+
$(document.body).html2canvas({
21+
logging: true
22+
});
23+
}, 100);
24+
};
25+
}(document, window));

0 commit comments

Comments
 (0)