Skip to content

Commit 7726cd9

Browse files
committed
updated test.js to allow options
1 parent 0b065ad commit 7726cd9

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ For more information and examples, please visit the <a href="http://html2canvas.
3939

4040
v0.34 -
4141

42-
* Split renderers to their own objects (<a href="#">niklasvh</a>)
42+
* Split renderers to their own objects (<a href="https://github.com/niklasvh/html2canvas/commit/94f2f799a457cd29a21cc56ef8c06f1697866739">niklasvh</a>)
4343
* Simplified API, cleaned up code (<a href="https://github.com/niklasvh/html2canvas/commit/c7d526c9eaa6a4abf4754d205fe1dee360c7660e">niklasvh</a>)
4444

4545
v0.33 - 2.3.2012

src/plugins/jquery.plugin.html2canvas.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
timer = date.getTime();
1414
options = options || {};
1515

16-
options.onrendered = function( canvas ) {
16+
options.onrendered = options.onrendered || function( canvas ) {
1717
var $canvas = $(canvas),
1818
finishTime = new Date();
1919

tests/test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
(function(document, window) {
99
var scrStart = '<script type="text/javascript" src="', scrEnd = '"></script>';
1010
document.write(scrStart + '../external/jquery-1.6.2.js' + scrEnd);
11-
var html2canvas = ['Core', 'Generate', 'Parse', 'Preload', 'Queue', 'Renderer', 'Util', 'renderers/Canvas', 'plugins/jquery.plugin.html2canvas'], i;
11+
var html2canvas = ['Core', 'Generate', 'Parse', 'Preload', 'Queue', 'Renderer', 'Util', 'renderers/Canvas', 'plugins/jquery.plugin.html2canvas'], i;
1212
for (i = 0; i < html2canvas.length; ++i) {
1313
document.write(scrStart + '../src/' + html2canvas[i] + '.js' + scrEnd);
1414
}
@@ -17,7 +17,7 @@
1717
window.setUp();
1818
}
1919
setTimeout(function() {
20-
$(document.body).html2canvas({
20+
$(document.body).html2canvas((typeof h2cOptions !== "undefined") ? h2cOptions : {
2121
flashcanvas: "../external/flashcanvas.min.js",
2222
logging: true,
2323
profile: true,

0 commit comments

Comments
 (0)