mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
Fix Uint16Array constructors. Fix https://github.com/konsoletyper/teavm/issues/209
This commit is contained in:
parent
6b6c968aea
commit
9d2e9d7911
|
@ -29,12 +29,12 @@ public abstract class Uint16Array extends ArrayBufferView {
|
|||
@JSIndexer
|
||||
public abstract void set(int index, int value);
|
||||
|
||||
@JSBody(params = "length", script = "return new Uint8Array(length);")
|
||||
@JSBody(params = "length", script = "return new Uint16Array(length);")
|
||||
public static native Uint16Array create(int length);
|
||||
|
||||
@JSBody(params = "buffer", script = "return new Uint8Array(buffer);")
|
||||
@JSBody(params = "buffer", script = "return new Uint16Array(buffer);")
|
||||
public static native Uint16Array create(ArrayBuffer buffer);
|
||||
|
||||
@JSBody(params = { "buffer", "offset", "length" }, script = "return new Uint8Array(buffer, offset, length);")
|
||||
@JSBody(params = { "buffer", "offset", "length" }, script = "return new Uint16Array(buffer, offset, length);")
|
||||
public static native Uint16Array create(ArrayBuffer buffer, int offset, int length);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user