Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
setup: function() {
this._super.apply(this, arguments);
if (websocket.ws) websocket.ws.destroy();
var uri = this.origin.replace('http://', 'ws://').replace('https://', 'wss://');
if (odoo.debug) {
uri += '?debug=' + $.deparam($.param.querystring()).debug;
}
websocket.ws = new WebSocket(uri);
}
});
setup: function() {
this._super.apply(this, arguments);
if (this.ws) this.ws.destroy();
var uri = this.origin.replace('http://', 'ws://').replace('https://', 'wss://');
this.ws = new WebSocket(uri);
},