File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -764,23 +764,26 @@ var jsPDF = (function(global) {
764
764
saveAs ( getBlob ( ) , options ) ;
765
765
if ( typeof saveAs . unload === 'function' ) {
766
766
if ( global . setTimeout ) {
767
- setTimeout ( saveAs . unload , 70 ) ;
767
+ setTimeout ( saveAs . unload , 911 ) ;
768
768
}
769
769
}
770
770
break ;
771
771
case 'arraybuffer' :
772
772
return getArrayBuffer ( ) ;
773
773
case 'blob' :
774
774
return getBlob ( ) ;
775
+ case 'bloburi' :
776
+ case 'bloburl' :
777
+ // User is responsible of calling revokeObjectURL
778
+ return global . URL && global . URL . createObjectURL ( getBlob ( ) ) || void 0 ;
775
779
case 'datauristring' :
776
780
case 'dataurlstring' :
777
781
return 'data:application/pdf;base64,' + btoa ( buildDocument ( ) ) ;
778
782
case 'datauri' :
779
783
case 'dataurl' :
780
- global . document . location . href = 'data:application/pdf;base64,' + btoa ( buildDocument ( ) ) ;
781
- break ;
784
+ return global . document . location . href = 'data:application/pdf;base64,' + btoa ( buildDocument ( ) ) ;
782
785
case 'dataurlnewwindow' :
783
- global . open ( 'data:application/pdf;base64,' + btoa ( buildDocument ( ) ) ) ;
786
+ return global . open ( 'data:application/pdf;base64,' + btoa ( buildDocument ( ) ) ) ;
784
787
break ;
785
788
default :
786
789
throw new Error ( 'Output type "' + type + '" is not supported.' ) ;
You can’t perform that action at this time.
0 commit comments