From 1978f97692e28b7a2848143621f2ac88def6c780 Mon Sep 17 00:00:00 2001 From: Steve Hannah Date: Fri, 1 Dec 2017 06:08:43 -0800 Subject: [PATCH] Added setLength method to JSArray --- jso/apis/src/main/java/org/teavm/jso/core/JSArray.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jso/apis/src/main/java/org/teavm/jso/core/JSArray.java b/jso/apis/src/main/java/org/teavm/jso/core/JSArray.java index 495a02dea..b735c8c9a 100644 --- a/jso/apis/src/main/java/org/teavm/jso/core/JSArray.java +++ b/jso/apis/src/main/java/org/teavm/jso/core/JSArray.java @@ -18,6 +18,7 @@ package org.teavm.jso.core; import org.teavm.jso.JSBody; import org.teavm.jso.JSIndexer; import org.teavm.jso.JSObject; +import org.teavm.jso.JSProperty; public abstract class JSArray implements JSArrayReader { private JSArray() { @@ -77,6 +78,9 @@ public abstract class JSArray implements JSArrayReader { public abstract JSArray splice(int start, int count, T a, T b, T c); public abstract JSArray 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();") public static native JSArray create();