Browse Source

Merge pull request #14718 from troy351/dev

ImageUtils: Remove usage of OffscreenCanvas in .getDataURL()
Mr.doob 7 years ago
parent
commit
8403e31ca5
1 changed files with 4 additions and 11 deletions
  1. 4 11
      src/extras/ImageUtils.js

+ 4 - 11
src/extras/ImageUtils.js

@@ -16,17 +16,10 @@ var ImageUtils = {
 
 		} else {
 
-			if ( typeof OffscreenCanvas !== 'undefined' ) {
-
-				canvas = new OffscreenCanvas( image.width, image.height );
-
-			} else {
-
-				canvas = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' );
-				canvas.width = image.width;
-				canvas.height = image.height;
-
-			}
+			// do not use OffscreenCanvas here, see #14713
+			canvas = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' );
+			canvas.width = image.width;
+			canvas.height = image.height;
 
 			var context = canvas.getContext( '2d' );