mirror of
https://github.com/antos-rde/antosdk-apps.git
synced 2024-11-08 06:28:29 +01:00
use new api
This commit is contained in:
parent
8288379482
commit
96e7662d6e
@ -270,14 +270,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
run() {
|
run() {
|
||||||
var me, proto, value;
|
var me, value;
|
||||||
me = this;
|
me = this;
|
||||||
value = this.editor.getValue().trim();
|
value = this.editor.getValue().trim();
|
||||||
if (!(value && value !== "")) {
|
if (!(value && value !== "")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
proto = window.location.protocol === "https:" ? "wss://" : "ws://";
|
this.socket = this.stream();
|
||||||
this.socket = new WebSocket(proto + this._api.HOST + "/system/apigateway?ws=1");
|
|
||||||
this.socket.onopen = function() {
|
this.socket.onopen = function() {
|
||||||
//send data to server
|
//send data to server
|
||||||
return me.socket.send(JSON.stringify({
|
return me.socket.send(JSON.stringify({
|
||||||
|
@ -193,8 +193,7 @@ class LuaPlayground extends this.OS.GUI.BaseApplication
|
|||||||
me = @
|
me = @
|
||||||
value = @editor.getValue().trim()
|
value = @editor.getValue().trim()
|
||||||
return unless value and value isnt ""
|
return unless value and value isnt ""
|
||||||
proto = if window.location.protocol is "https:" then "wss://" else "ws://"
|
@socket = @stream()
|
||||||
@socket = new WebSocket proto + @_api.HOST + "/system/apigateway?ws=1"
|
|
||||||
@socket.onopen = () ->
|
@socket.onopen = () ->
|
||||||
#send data to server
|
#send data to server
|
||||||
me.socket.send( JSON.stringify { code: value } )
|
me.socket.send( JSON.stringify { code: value } )
|
||||||
|
Loading…
Reference in New Issue
Block a user