|
@@ -34,6 +34,7 @@ class Bytes {
|
|
|
this.length = data.byteLength;
|
|
|
this.b = new js.html.Uint8Array(data);
|
|
|
untyped {
|
|
|
+ b.bufferValue = data; // some impl does not return the same instance in .buffer
|
|
|
data.hxBytes = this;
|
|
|
data.bytes = this.b;
|
|
|
}
|
|
@@ -183,7 +184,7 @@ class Bytes {
|
|
|
}
|
|
|
|
|
|
public inline function getData() : BytesData {
|
|
|
- return b.buffer;
|
|
|
+ return untyped b.bufferValue;
|
|
|
}
|
|
|
|
|
|
public static function alloc( length : Int ) : Bytes {
|