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
Hi, unfortunately some browsers (or similar devices) do not accept passing more than 2 arguments to the native WebSocket class. For example I get this error in Cordova:
Failed to construct 'WebSocket': No matching constructor signature.
This is because the official W3C WebSocket constructor just allows two arguments (WS URI and protocols), but in W3CWebSocket class we pass more arguments (those tha are useful when running in Node).
Hi, unfortunately some browsers (or similar devices) do not accept passing more than 2 arguments to the native
WebSocket
class. For example I get this error in Cordova:This is because the official W3C
WebSocket
constructor just allows two arguments (WS URI and protocols), but inW3CWebSocket
class we pass more arguments (those tha are useful when running in Node).This is the way in which
ws
solves this problem:https://github.com/einaros/ws/blob/master/lib/browser.js
I will apply it and send a PR.
The text was updated successfully, but these errors were encountered: