I’m having some issues converting from haxe.io.UInt8Array to Bytes on the js target.
specifically a UInt8Array created with the subarray() method.
var bytes:haxe.io.UInt8Array = new haxe.io.UInt8Array(10);
var sub = bytes.subarray(2, 2);
var test = sub.view.buffer;
js.Browser.alert(test.length); //alerts 10 (I would expect 2)
Never used those but it seems you need to use sub.view.byteLength if you want to know the sub’s length,
and start from sub.view.byteOffset if you directly access the buffer.
Also the length is 0 not 2 since subarray takes a begin index and an end index, not length.