From e14d3e24d65a38ba073a4413a934371908c46381 Mon Sep 17 00:00:00 2001 From: player-03 Date: Mon, 17 Apr 2023 14:19:15 -0400 Subject: [PATCH] Always call `new window.Image()`, for consistency. There's no practical downside to doing this, and it makes Lime compatible with tools that act like genes but aren't named "genes." --- src/lime/_internal/backend/html5/HTML5HTTPRequest.hx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/lime/_internal/backend/html5/HTML5HTTPRequest.hx b/src/lime/_internal/backend/html5/HTML5HTTPRequest.hx index 94c3f2b59..d2cb080bc 100644 --- a/src/lime/_internal/backend/html5/HTML5HTTPRequest.hx +++ b/src/lime/_internal/backend/html5/HTML5HTTPRequest.hx @@ -444,11 +444,7 @@ class HTML5HTTPRequest private static function __loadImage(uri:String, promise:Promise, options:Int):Void { - #if (openfljs || genes) - var image:JSImage = untyped #if haxe4 js.Syntax.code #else __js__ #end ('new window.Image ()'); - #else - var image = new JSImage(); - #end + var image:JSImage = #if haxe4 js.Syntax.code #else __js__ #end ('new window.Image ()'); if (!__isSameOrigin(uri)) {