File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change 8787 if ( window . HTMLCanvasElement && ! CanvasPrototype . toBlob ) {
8888 if ( CanvasPrototype . mozGetAsFile ) {
8989 CanvasPrototype . toBlob = function ( callback , type , quality ) {
90- if ( quality && CanvasPrototype . toDataURL && dataURLtoBlob ) {
91- callback ( dataURLtoBlob ( this . toDataURL ( type , quality ) ) )
92- } else {
93- callback ( this . mozGetAsFile ( 'blob' , type ) )
94- }
90+ var self = this
91+ setTimeout ( function ( ) {
92+ if ( quality && CanvasPrototype . toDataURL && dataURLtoBlob ) {
93+ callback ( dataURLtoBlob ( self . toDataURL ( type , quality ) ) )
94+ } else {
95+ callback ( self . mozGetAsFile ( 'blob' , type ) )
96+ }
97+ } )
9598 }
9699 } else if ( CanvasPrototype . toDataURL && dataURLtoBlob ) {
97100 CanvasPrototype . toBlob = function ( callback , type , quality ) {
98- callback ( dataURLtoBlob ( this . toDataURL ( type , quality ) ) )
101+ var self = this
102+ setTimeout ( function ( ) {
103+ callback ( dataURLtoBlob ( self . toDataURL ( type , quality ) ) )
104+ } )
99105 }
100106 }
101107 }
You can’t perform that action at this time.
0 commit comments