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."
This commit is contained in:
player-03
2023-04-17 14:19:15 -04:00
committed by GitHub
parent fb5d64dc79
commit e14d3e24d6

View File

@@ -444,11 +444,7 @@ class HTML5HTTPRequest
private static function __loadImage(uri:String, promise:Promise<Image>, 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))
{