2011-12-11 21:06:57 +04:00
|
|
|
/*
|
|
|
|
html2canvas @VERSION@ <http://html2canvas.hertzen.com>
|
|
|
|
Copyright (c) 2011 Niklas von Hertzen. All rights reserved.
|
|
|
|
http://www.twitter.com/niklasvh
|
|
|
|
|
|
|
|
Released under MIT License
|
|
|
|
*/
|
2012-03-03 21:18:39 +04:00
|
|
|
var h2cSelector, h2cOptions;
|
2011-12-11 21:06:57 +04:00
|
|
|
(function(document, window) {
|
2012-12-28 01:06:47 +04:00
|
|
|
var srcStart = '<script type="text/javascript" src="', scrEnd = '"></script>';
|
|
|
|
|
2012-12-28 01:57:06 +04:00
|
|
|
document.write(srcStart + '/tests/assets/jquery-1.6.2.js' + scrEnd);
|
2012-12-28 01:53:27 +04:00
|
|
|
document.write(srcStart + '/tests/assets/jquery.plugin.html2canvas.js' + scrEnd);
|
2014-03-15 15:20:05 +04:00
|
|
|
var html2canvas = ['log', 'nodecontainer', 'stackingcontext', 'textcontainer', 'support', 'imagecontainer', 'dummyimagecontainer', 'proxyimagecontainer', 'gradientcontainer', 'lineargradientcontainer', 'webkitgradientcontainer',
|
2014-02-01 22:03:23 +04:00
|
|
|
'imageloader', 'nodeparser', 'font', 'fontmetrics', 'core', 'renderer', 'promise', 'renderers/canvas'], i;
|
2012-03-02 20:05:03 +04:00
|
|
|
for (i = 0; i < html2canvas.length; ++i) {
|
2014-01-19 23:05:07 +04:00
|
|
|
document.write(srcStart + '/src/' + html2canvas[i] + '.js?' + Math.random() + scrEnd);
|
2011-12-11 21:06:57 +04:00
|
|
|
}
|
2012-03-02 20:05:03 +04:00
|
|
|
window.onload = function() {
|
2014-02-23 19:02:49 +04:00
|
|
|
h2cSelector = [document.documentElement];
|
2012-05-29 05:26:26 +04:00
|
|
|
|
2012-03-02 20:05:03 +04:00
|
|
|
if (window.setUp) {
|
|
|
|
window.setUp();
|
|
|
|
}
|
2012-05-29 05:26:26 +04:00
|
|
|
|
2012-03-02 20:05:03 +04:00
|
|
|
setTimeout(function() {
|
2012-05-29 05:26:26 +04:00
|
|
|
|
2012-03-02 21:22:23 +04:00
|
|
|
$(h2cSelector).html2canvas($.extend({
|
2012-03-02 20:05:03 +04:00
|
|
|
flashcanvas: "../external/flashcanvas.min.js",
|
|
|
|
logging: true,
|
|
|
|
profile: true,
|
2012-12-28 01:53:27 +04:00
|
|
|
proxy: "http://html2canvas.appspot.com/query",
|
2014-02-17 02:04:09 +04:00
|
|
|
useCORS: false
|
2012-03-02 21:22:23 +04:00
|
|
|
}, h2cOptions));
|
2012-03-02 20:05:03 +04:00
|
|
|
}, 100);
|
|
|
|
};
|
2012-02-04 18:32:09 +04:00
|
|
|
}(document, window));
|