From de988da39e53d78fcf9d913c4ea12f20754ce8d4 Mon Sep 17 00:00:00 2001 From: RblSb Date: Mon, 6 Jan 2025 11:44:16 +0300 Subject: [PATCH] Another nightly fix Also remove ie9 code --- Backends/HTML5/kha/LoaderImpl.hx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Backends/HTML5/kha/LoaderImpl.hx b/Backends/HTML5/kha/LoaderImpl.hx index acf27d2b6..4a67067dd 100644 --- a/Backends/HTML5/kha/LoaderImpl.hx +++ b/Backends/HTML5/kha/LoaderImpl.hx @@ -159,9 +159,9 @@ class LoaderImpl { } public static function loadRemote(desc: Dynamic, done: Blob->Void, failed: AssetError->Void) { - var request = untyped new XMLHttpRequest(); + var request = new XMLHttpRequest(); request.open("GET", desc.files[0], true); - request.responseType = "arraybuffer"; + request.responseType = ARRAYBUFFER; request.onreadystatechange = function() { if (request.readyState != 4) @@ -174,12 +174,6 @@ class LoaderImpl { var byteArray: Dynamic = Syntax.code("new Uint8Array(arrayBuffer)"); bytes = Bytes.ofData(byteArray); } - else if (request.responseBody != null) { - var data: Dynamic = untyped Syntax.code("VBArray(request.responseBody).toArray()"); - bytes = Bytes.alloc(data.length); - for (i in 0...data.length) - bytes.set(i, data[i]); - } else { failed({url: desc.files[0]}); return;