Permalink
Browse files

Merge pull request #324 from volkipp/haxe-3.2

Fixed some slight type changes with the Haxe 3.2 nightlies.
  • Loading branch information...
aduros committed Mar 10, 2015
2 parents 0383fa7 + 6e08bf0 commit ec084011873cf16635f4e2a77cc0d2dc6c58625d
@@ -8,6 +8,7 @@ import js.Browser;
import js.html.*;
import haxe.io.Bytes;
import haxe.io.BytesData;
import flambe.display.Graphics;
import flambe.display.Texture;
@@ -40,8 +41,7 @@ class CanvasTextureRoot extends BasicAsset<CanvasTextureRoot>
{
assertNotDisposed();
var data :Array<Int> = cast getContext2d().getImageData(x, y, width, height).data;
return Bytes.ofData(data);
return Bytes.ofData(cast getContext2d().getImageData(x, y, width, height).data);
}
public function writePixels (pixels :Bytes, x :Int, y :Int, sourceW :Int, sourceH :Int)
@@ -202,7 +202,7 @@ class HtmlAssetPackLoader extends BasicAssetPackLoader
}
xhr = new XMLHttpRequest();
xhr.open("GET", url, true);
xhr.responseType = responseType;
untyped xhr.responseType = responseType;
var lastProgress = 0.0;
xhr.onprogress = function (event :ProgressEvent) {
@@ -361,11 +361,12 @@ class HtmlAssetPackLoader extends BasicAssetPackLoader
// request so it's all good.
xhr.open("GET", ".", true);
if (xhr.responseType != "") {
if (untyped xhr.responseType != "") {
return false; // No responseType supported at all
}
xhr.responseType = "blob";
if (xhr.responseType != "blob") {
untyped xhr.responseType = "blob"; // Using untyped to prevent problems going between haxe 3.1 to haxe 3.2
if (untyped xhr.responseType != "blob") {
return false; // Blob responseType not supported
}

1 comment on commit ec08401

@PodrugStudio

This comment has been minimized.

Show comment
Hide comment
@PodrugStudio

PodrugStudio Aug 26, 2016

... for people still having HtmlExternal errors after this patch; continue here -> https://git.io/v6AX1

PodrugStudio commented on ec08401 Aug 26, 2016

... for people still having HtmlExternal errors after this patch; continue here -> https://git.io/v6AX1

Please sign in to comment.