Fixed the "image.addEventListener is not a function" browser error when using the generated ES6 lime.graphics.Image.fromBase64() function

This commit is contained in:
Andres
2018-03-15 22:33:17 -07:00
committed by Joshua Granick
parent b77508b29c
commit d806b27b1b

View File

@@ -1300,7 +1300,12 @@ class Image {
private function __fromBase64 (base64:String, type:String, onload:Image->Void = null):Void {
#if (js && html5)
#if openfljs
var image:JSImage = untyped __js__('new window.Image ()');
#else
var image = new JSImage ();
#end
var image_onLoaded = function (event) {
@@ -1396,7 +1401,11 @@ class Image {
#if (js && html5)
#if openfljs
var image:JSImage = untyped __js__('new window.Image ()');
#else
var image = new JSImage ();
#end
#if !display
if (!HTML5HTTPRequest.__isSameOrigin (path)) {