You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now that developing Electron based apps is common, to support those apps, I think we better remove the check if (typeof window === 'undefined') as anyway it is in try/catch.
if (typeof window === 'undefined') { // removing this check would work in Browser, Node.js, Electron apps :)
try {
var ws = require('ws');
Socket = (ws.Client || ws.client || ws);
} catch(e) {}
}
Hi,
Now that developing Electron based apps is common, to support those apps, I think we better remove the check
if (typeof window === 'undefined')
as anyway it is in try/catch.(at github.com/AngularClass/angular-websocket/blob/master/src/angular-websocket.js#L5)
Due to this check, as Electron has 'window' in render process, it is not picking 'ws' module, and lacking many features 'ws' supports (like, auth).
I knew we can achieve basic auth with
wss://user:pass@serverurl
. But it does has more options.Any thoughts?
The text was updated successfully, but these errors were encountered: