From 4e0381950a916486770997c1e91dbd1b1818275c Mon Sep 17 00:00:00 2001 From: Colin Alworth Date: Thu, 3 Oct 2019 21:21:01 -0500 Subject: [PATCH] Added WebSocket.send overrides to support typedarrays --- .../src/main/java/org/teavm/jso/websocket/WebSocket.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/jso/apis/src/main/java/org/teavm/jso/websocket/WebSocket.java b/jso/apis/src/main/java/org/teavm/jso/websocket/WebSocket.java index cbf906366..8c5ead3ed 100644 --- a/jso/apis/src/main/java/org/teavm/jso/websocket/WebSocket.java +++ b/jso/apis/src/main/java/org/teavm/jso/websocket/WebSocket.java @@ -21,6 +21,8 @@ import org.teavm.jso.JSProperty; import org.teavm.jso.dom.events.Event; import org.teavm.jso.dom.events.EventListener; import org.teavm.jso.dom.events.MessageEvent; +import org.teavm.jso.typedarrays.ArrayBuffer; +import org.teavm.jso.typedarrays.ArrayBufferView; public abstract class WebSocket implements JSObject { @JSProperty("onclose") @@ -52,6 +54,10 @@ public abstract class WebSocket implements JSObject { public abstract void send(String data); + public abstract void send(ArrayBuffer data); + + public abstract void send(ArrayBufferView data); + @JSProperty public abstract String getBinaryType();