Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
wsConnect(xsedit) {
let context = this;
let url = "ws://" + xsedit;
let helper = this;
let ws = this.ws = new WebSocketClient(url);
ws.onopen = function() {
// trace("WSC: onopen\n");
try {
this.helper = helper;
var uuid = require.weak("uuid");
this.send(uuid.get());
}
catch (e) {
this.helper.wsErrorResponse(500, HTTP_ERROR_500);
}
}
ws.onmessage = function(message) {
// trace("WSC: onmessage " + message.data + "\n");
try {
let json = JSON.parse(message.data);
let helper = this.helper;