-
Notifications
You must be signed in to change notification settings - Fork 29.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CloseEvent
#46880
Comments
I'm inclined to say exporting |
I thought WebSockets were implemented in Node. I use mock-socket which automatically adds the I agree to add module.exports.getGlobalOrigin = getGlobalOrigin
}
+ if (nodeMajor >= 18) {
+ const { WebSocket } = require('./lib/websocket/websocket')
+
+ module.exports.WebSocket = WebSocket
+ }
+
module.exports.request = makeDispatcher(api.request)
module.exports.stream = makeDispatcher(api.stream)
module.exports.pipeline = makeDispatcher(api.pipeline) |
I'll close this then. It's something we can revisit if and when node implements websockets. |
What is the problem this feature will solve?
The
CloseEvent
class isn't defined.What is the feature you are proposing to solve the problem?
Add the
CloseEvent
class in the global scope. I found it in undici.What alternatives have you considered?
Export
CloseEvent
class from events.The text was updated successfully, but these errors were encountered: