Added setLength method to JSArray

This commit is contained in:
Steve Hannah 2017-12-01 06:08:43 -08:00 committed by Alexey Andreev
parent 3c83c7e7b9
commit 1978f97692

View File

@ -18,6 +18,7 @@ package org.teavm.jso.core;
import org.teavm.jso.JSBody; import org.teavm.jso.JSBody;
import org.teavm.jso.JSIndexer; import org.teavm.jso.JSIndexer;
import org.teavm.jso.JSObject; import org.teavm.jso.JSObject;
import org.teavm.jso.JSProperty;
public abstract class JSArray<T extends JSObject> implements JSArrayReader<T> { public abstract class JSArray<T extends JSObject> implements JSArrayReader<T> {
private JSArray() { private JSArray() {
@ -77,6 +78,9 @@ public abstract class JSArray<T extends JSObject> implements JSArrayReader<T> {
public abstract JSArray<T> splice(int start, int count, T a, T b, T c); public abstract JSArray<T> splice(int start, int count, T a, T b, T c);
public abstract JSArray<T> splice(int start, int count, T a, T b, T c, T d); public abstract JSArray<T> splice(int start, int count, T a, T b, T c, T d);
@JSProperty
public abstract void setLength(int len);
@JSBody(script = "return new Array();") @JSBody(script = "return new Array();")
public static native <T extends JSObject> JSArray<T> create(); public static native <T extends JSObject> JSArray<T> create();