Fixed an HTML Image issue when using the genes library to compile ES modules. Need to explicitly use: new window.Image()

This commit is contained in:
andresa88
2023-04-17 10:06:24 -07:00
parent 1951c30d05
commit fb5d64dc79

View File

@@ -444,7 +444,11 @@ 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
if (!__isSameOrigin(uri))
{