File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1
1
// dom-to-image-2.6.0
2
- // patched to add toCanvas public function (line 111)
3
- // patched to fix uncaught in promise (line 741)
2
+ // patched to add toCanvas public function (line 112)
3
+ // patched to fix uncaught in promise (line 742)
4
+ // patched to fix illegal symbols in data-uri (line 349, 358)
4
5
( function ( global ) {
5
6
'use strict' ;
6
7
345
346
node . setAttribute ( 'xmlns' , 'http://www.w3.org/1999/xhtml' ) ;
346
347
return new XMLSerializer ( ) . serializeToString ( node ) ;
347
348
} )
348
- . then ( util . escapeXhtml )
349
+ // .then(util.escapeXhtml)
349
350
. then ( function ( xhtml ) {
350
351
return '<foreignObject x="0" y="0" width="100%" height="100%">' + xhtml + '</foreignObject>' ;
351
352
} )
354
355
foreignObject + '</svg>' ;
355
356
} )
356
357
. then ( function ( svg ) {
357
- return 'data:image/svg+xml;charset=utf-8,' + svg ;
358
+ return 'data:image/svg+xml;charset=utf-8,' + encodeURIComponent ( svg ) ;
358
359
} ) ;
359
360
}
360
361
Original file line number Diff line number Diff line change @@ -560,7 +560,7 @@ var gsTabSuspendManager = (function() {
560
560
if ( useAlternateScreenCaptureLib ) {
561
561
// console.log('Generating via dom-to-image..');
562
562
generateCanvas = ( ) => {
563
- return domtoimage . toCanvas ( document . body , { } ) . then ( canvas => {
563
+ return domtoimage . toCanvas ( document . body , { width : width , height : height } ) . then ( canvas => {
564
564
const croppedCanvas = document . createElement ( 'canvas' ) ;
565
565
const context = croppedCanvas . getContext ( '2d' ) ;
566
566
croppedCanvas . width = width ;
You can’t perform that action at this time.
0 commit comments