diff --git a/jso/apis/src/main/java/org/teavm/jso/typedarrays/DataView.java b/jso/apis/src/main/java/org/teavm/jso/typedarrays/DataView.java index dd851a37f..92aa3ec75 100644 --- a/jso/apis/src/main/java/org/teavm/jso/typedarrays/DataView.java +++ b/jso/apis/src/main/java/org/teavm/jso/typedarrays/DataView.java @@ -77,8 +77,8 @@ public abstract class DataView extends ArrayBufferView { @JSBody(params = "buffer", script = "return new DataView(buffer);") public static native DataView create(ArrayBuffer buffer); - @JSBody(params = "buffer", script = "return new DataView(buffer);") - public static native DataView create(ArrayBufferView buffer); + @JSBody(params = "bufferView", script = "return new DataView(bufferView.buffer);") + public static native DataView create(ArrayBufferView bufferView); @JSBody(params = { "buffer", "offset", "length" }, script = "return new DataView(buffer, offset, length);") public static native DataView create(ArrayBuffer buffer, int offset, int length); diff --git a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Float32Array.java b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Float32Array.java index 64647df3a..ad650d14e 100644 --- a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Float32Array.java +++ b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Float32Array.java @@ -31,8 +31,8 @@ public abstract class Float32Array extends ArrayBufferView { @JSBody(params = "buffer", script = "return new Float32Array(buffer);") public static native Float32Array create(ArrayBuffer buffer); - @JSBody(params = "buffer", script = "return new Float32Array(buffer);") - public static native Float32Array create(ArrayBufferView buffer); + @JSBody(params = "bufferView", script = "return new Float32Array(bufferView.buffer);") + public static native Float32Array create(ArrayBufferView bufferView); @JSBody(params = { "buffer", "offset", "length" }, script = "return new Float32Array(buffer, offset, length);") public static native Float32Array create(ArrayBuffer buffer, int offset, int length); diff --git a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Float64Array.java b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Float64Array.java index d1379f931..0b86a3bc1 100644 --- a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Float64Array.java +++ b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Float64Array.java @@ -31,8 +31,8 @@ public abstract class Float64Array extends ArrayBufferView { @JSBody(params = "buffer", script = "return new Float64Array(buffer);") public static native Float64Array create(ArrayBuffer buffer); - @JSBody(params = "buffer", script = "return new Float64Array(buffer);") - public static native Float64Array create(ArrayBufferView buffer); + @JSBody(params = "bufferView", script = "return new Float64Array(bufferView.buffer);") + public static native Float64Array create(ArrayBufferView bufferView); @JSBody(params = { "buffer", "offset", "length" }, script = "return new Float64Array(buffer, offset, length);") public static native Float64Array create(ArrayBuffer buffer, int offset, int length); diff --git a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Int16Array.java b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Int16Array.java index caaa5d0bf..f9bfc84d2 100644 --- a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Int16Array.java +++ b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Int16Array.java @@ -31,8 +31,8 @@ public abstract class Int16Array extends ArrayBufferView { @JSBody(params = "buffer", script = "return new Int16Array(buffer);") public static native Int16Array create(ArrayBuffer buffer); - @JSBody(params = "buffer", script = "return new Int16Array(buffer);") - public static native Int16Array create(ArrayBufferView buffer); + @JSBody(params = "bufferView", script = "return new Int16Array(bufferView.buffer);") + public static native Int16Array create(ArrayBufferView bufferView); @JSBody(params = { "buffer", "offset", "length" }, script = "return new Int16Array(buffer, offset, length);") public static native Int16Array create(ArrayBuffer buffer, int offset, int length); diff --git a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Int32Array.java b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Int32Array.java index 0f92358c9..f59facc1c 100644 --- a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Int32Array.java +++ b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Int32Array.java @@ -36,8 +36,8 @@ public abstract class Int32Array extends ArrayBufferView { @JSBody(params = "buffer", script = "return new Int32Array(buffer);") public static native Int32Array create(ArrayBuffer buffer); - @JSBody(params = "buffer", script = "return new Int32Array(buffer);") - public static native Int32Array create(ArrayBufferView buffer); + @JSBody(params = "bufferView", script = "return new Int32Array(bufferView.buffer);") + public static native Int32Array create(ArrayBufferView bufferView); @JSBody(params = { "buffer", "offset", "length" }, script = "return new Int32Array(buffer, offset, length);") public static native Int32Array create(ArrayBuffer buffer, int offset, int length); diff --git a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Int8Array.java b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Int8Array.java index ed42d640c..8c30e2fd0 100644 --- a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Int8Array.java +++ b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Int8Array.java @@ -31,8 +31,8 @@ public abstract class Int8Array extends ArrayBufferView { @JSBody(params = "buffer", script = "return new Int8Array(buffer);") public static native Int8Array create(ArrayBuffer buffer); - @JSBody(params = "buffer", script = "return new Int8Array(buffer);") - public static native Int8Array create(ArrayBufferView buffer); + @JSBody(params = "bufferView", script = "return new Int8Array(bufferView.buffer);") + public static native Int8Array create(ArrayBufferView bufferView); @JSBody(params = { "buffer", "offset", "length" }, script = "return new Int8Array(buffer, offset, length);") public static native Int8Array create(ArrayBuffer buffer, int offset, int length); diff --git a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Uint16Array.java b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Uint16Array.java index 177975a0f..4c5fb34aa 100644 --- a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Uint16Array.java +++ b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Uint16Array.java @@ -31,8 +31,8 @@ public abstract class Uint16Array extends ArrayBufferView { @JSBody(params = "buffer", script = "return new Uint16Array(buffer);") public static native Uint16Array create(ArrayBuffer buffer); - @JSBody(params = "buffer", script = "return new Uint16Array(buffer);") - public static native Uint16Array create(ArrayBufferView buffer); + @JSBody(params = "bufferView", script = "return new Uint16Array(bufferView.buffer);") + public static native Uint16Array create(ArrayBufferView bufferView); @JSBody(params = { "buffer", "offset", "length" }, script = "return new Uint16Array(buffer, offset, length);") public static native Uint16Array create(ArrayBuffer buffer, int offset, int length); diff --git a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Uint8Array.java b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Uint8Array.java index dbb1fc959..62c49aa8a 100644 --- a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Uint8Array.java +++ b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Uint8Array.java @@ -31,8 +31,8 @@ public abstract class Uint8Array extends ArrayBufferView { @JSBody(params = "buffer", script = "return new Uint8Array(buffer);") public static native Uint8Array create(ArrayBuffer buffer); - @JSBody(params = "buffer", script = "return new Uint8Array(buffer);") - public static native Uint8Array create(ArrayBufferView buffer); + @JSBody(params = "bufferView", script = "return new Uint8Array(bufferView.buffer);") + public static native Uint8Array create(ArrayBufferView bufferView); @JSBody(params = { "buffer", "offset", "length" }, script = "return new Uint8Array(buffer, offset, length);") public static native Uint8Array create(ArrayBuffer buffer, int offset, int length); diff --git a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Uint8ClampedArray.java b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Uint8ClampedArray.java index 6fbdb6545..d814ff599 100644 --- a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Uint8ClampedArray.java +++ b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Uint8ClampedArray.java @@ -31,8 +31,8 @@ public abstract class Uint8ClampedArray extends ArrayBufferView { @JSBody(params = "buffer", script = "return new Uint8ClampedArray(buffer);") public static native Uint8ClampedArray create(ArrayBuffer buffer); - @JSBody(params = "buffer", script = "return new Uint8ClampedArray(buffer);") - public static native Uint8ClampedArray create(ArrayBufferView buffer); + @JSBody(params = "bufferView", script = "return new Uint8ClampedArray(bufferView.buffer);") + public static native Uint8ClampedArray create(ArrayBufferView bufferView); @JSBody(params = { "buffer", "offset", "length" }, script = "return new " + "Uint8ClampedArray(buffer, offset, length);")