1- html2canvas = function ( elements , opts ) {
2-
1+ window . html2canvas = function ( elements , opts ) {
32 var queue ,
43 canvas ,
54 options = {
@@ -8,7 +7,7 @@ html2canvas = function( elements, opts ) {
87 elements : elements ,
98
109 // preload options
11- proxy : "http://html2canvas.appspot.com/ " ,
10+ proxy : "" ,
1211 timeout : 0 , // no timeout
1312 useCORS : false , // try to load images as CORS (where available), before falling back to proxy
1413 allowTaint : false , // whether to allow images to taint the canvas, won't need proxy if set to true
@@ -27,18 +26,10 @@ html2canvas = function( elements, opts ) {
2726 height : null ,
2827 taintTest : true , // do a taint test with all images before applying to canvas
2928 renderer : "Canvas"
30- } , renderer ;
29+ } ;
3130
3231 options = _html2canvas . Util . Extend ( opts , options ) ;
3332
34- if ( typeof options . renderer === "string" && _html2canvas . Renderer [ options . renderer ] !== undefined ) {
35- options . _renderer = _html2canvas . Renderer [ options . renderer ] ( options ) ;
36- } else if ( typeof options . renderer === "function" ) {
37- options . _renderer = options . renderer ( options ) ;
38- } else {
39- throw ( "Unknown renderer" ) ;
40- }
41-
4233 _html2canvas . logging = options . logging ;
4334 options . complete = function ( images ) {
4435
@@ -83,7 +74,7 @@ html2canvas = function( elements, opts ) {
8374 } ;
8475} ;
8576
86- html2canvas . log = h2clog ; // for renderers
87- html2canvas . Renderer = {
77+ window . html2canvas . log = h2clog ; // for renderers
78+ window . html2canvas . Renderer = {
8879 Canvas : undefined // We are assuming this will be used
8980} ;
0 commit comments