UNPKG

create-expo-cljs-app

Version:

Create a react native application with Expo and Shadow-CLJS!

39 lines (29 loc) 1.16 kB
goog.provide('shadow.cljs.devtools.client.websocket'); shadow.cljs.devtools.client.websocket.start = (function shadow$cljs$devtools$client$websocket$start(runtime){ var ws_url = shadow.cljs.devtools.client.env.get_ws_relay_url(); var socket = (new WebSocket(ws_url)); (socket.onmessage = (function (e){ return shadow.cljs.devtools.client.shared.remote_msg(runtime,e.data); })); (socket.onopen = (function (e){ return shadow.cljs.devtools.client.shared.remote_open(runtime,e); })); (socket.onclose = (function (e){ return shadow.cljs.devtools.client.shared.remote_close(runtime,e); })); (socket.onerror = (function (e){ return shadow.cljs.devtools.client.shared.remote_error(runtime,e); })); return socket; }); shadow.cljs.devtools.client.websocket.send = (function shadow$cljs$devtools$client$websocket$send(socket,msg){ return socket.send(msg); }); shadow.cljs.devtools.client.websocket.stop = (function shadow$cljs$devtools$client$websocket$stop(socket){ (socket.onopen = null); (socket.onclose = null); (socket.onmessage = null); (socket.onerror = null); return socket.close(); }); //# sourceMappingURL=shadow.cljs.devtools.client.websocket.js.map