-
Notifications
You must be signed in to change notification settings - Fork 19
Missing support for Node.js #18
Comments
It looks like |
This is a browser only library that wraps the browser-only W3C |
@bennyn The
The harder problem is to fix the I need to port this to Node.js because I am using Jest to unit-test the stuff. And Jest is using Node.js rather than browser API. |
@hktonylee Instead of using the CustomEvent interface you can have a look at Node.js' EventEmitter. And if you need a reconnecting WebSocket implementation (which works in Browsers & Node.js), I recommend you reconnecting-websocket. It has multiplatform support and we are using it at Wire for our wire-web-api-client. |
@bennyn Yes I read the |
hmm interesting that project has no dependencies. Perhaps this project support node via |
I tried using "robust-websocket" with a Node.js application but it doesn't work. The error message is:
The navigator object is only available in browsers and I read that "robust-websocket" has been built for browsers but couldn't you use the same code in Node.js when ws is available?
I am thinking of something like this:
The text was updated successfully, but these errors were encountered: