Hi,
I have a Jet app using your websocket example:
webix.proxy.socket = {
$proxy:true,
load:function(view) {
//create a socket connection
this.socket = new WebSocket("ws:"+this.source);
//handle errors
this.socket.onerror = (error) => {
console.log("WebSocket Error", error);
};
//receive updates
this.socket.onmessage = (e) => {
// update view data
// ...
};
//close a socket connection when a view is destroyed
view.attachEvent("onDestruct", () => {
this.socket.close();
});
},
save:function(view, update) {
//send message to server
this.socket.send(webix.stringify(update));
}
};
problem is when I save I get this.socket is undefined.
Any help would be greatly appreciated.
-Tomas