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:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user