We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm using Node v20.14.0 with @hono/node-ws v1.0.1 and when listening to the onClose event it throws the following error:
v20.14.0
v1.0.1
events.onClose?.(new CloseEvent("close"), ctx); ^ ReferenceError: CloseEvent is not defined
The text was updated successfully, but these errors were encountered:
Spotted this as well with node.js v22.3.0 although this seems to be an upstream issue which already has a committed fix. nodejs/node#53355
v22.3.0
My monkeypatch for it right now is to just slot this in somewhere using this for reference
globalThis.CloseEvent = class CloseEvent extends Event { constructor(type, eventInitDict = {}) { super(type, eventInitDict); if (eventInitDict.wasClean) this.wasClean = eventInitDict.wasClean; if (eventInitDict.code) this.code = eventInitDict.code; if (eventInitDict.reason) this.reason = eventInitDict.reason; } wasClean = false; code = 0; reason = ""; };
Sorry, something went wrong.
Well, close doesn't really work and connections gets multiplied everytime. I guess the module is bugged
CloseEvent
Successfully merging a pull request may close this issue.
I'm using Node
v20.14.0
with @hono/node-wsv1.0.1
and when listening to the onClose event it throws the following error:The text was updated successfully, but these errors were encountered: