Image: compatibility fix to allow use of genes library to compile as ES modules

This commit is contained in:
Josh Tynjala
2022-02-11 10:32:47 -08:00
parent 45955412eb
commit 925e2b67e7

View File

@@ -1438,7 +1438,7 @@ class Image
@:noCompletion private function __fromBase64(base64:String, type:String, onload:Image->Void = null):Void
{
#if (js && html5)
#if openfljs
#if (openfljs || genes)
var image:JSImage = untyped #if haxe4 js.Syntax.code #else __js__ #end ('new window.Image ()');
#else
var image = new JSImage();
@@ -1574,7 +1574,7 @@ class Image
catch (e:Dynamic) {}
});
#elseif (js && html5)
#if openfljs
#if (openfljs || genes)
var image:JSImage = untyped #if haxe4 js.Syntax.code #else __js__ #end ('new window.Image ()');
#else
var image = new JSImage();