-
Notifications
You must be signed in to change notification settings - Fork 28.9k
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
lib: expose global CloseEvent #53355
Conversation
Review requested:
|
This PR adds `CloseEvent` as a global, which can be disabled via the --no-experimental-websocket flag. ```js const ws = new WebSocket('...') ws.addEventListener('close', (event) => { assert(event instanceof CloseEvent) }) ``` Fixes: nodejs#50275
3d3b107
to
48a2f5d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nodejs/tsc @nodejs/web-standards since this adds a global, pinging for visibility.
LGTM thanks for this 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Landed in 6ed93b4 |
This PR adds `CloseEvent` as a global, which can be disabled via the --no-experimental-websocket flag. ```js const ws = new WebSocket('...') ws.addEventListener('close', (event) => { assert(event instanceof CloseEvent) }) ``` Fixes: nodejs#50275 PR-URL: nodejs#53355 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
This PR adds `CloseEvent` as a global, which can be disabled via the --no-experimental-websocket flag. ```js const ws = new WebSocket('...') ws.addEventListener('close', (event) => { assert(event instanceof CloseEvent) }) ``` Fixes: nodejs#50275 PR-URL: nodejs#53355 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
This PR adds
CloseEvent
as a global, which can be disabled via the --no-experimental-websocket flag.Fixes: #50275