Skip to content

Commit

Permalink
Another nightly fix
Browse files Browse the repository at this point in the history
Also remove ie9 code
  • Loading branch information
RblSb authored Jan 6, 2025
1 parent be157f3 commit de988da
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions Backends/HTML5/kha/LoaderImpl.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;
Expand Down

0 comments on commit de988da

Please sign in to comment.