Skip to content
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

Provide WebSocket ready state constants to follow the Web IDL definition #1393

Merged
merged 2 commits into from
Dec 19, 2023

Conversation

bcaimano
Copy link
Contributor

@bcaimano bcaimano commented Nov 6, 2023

See #1370. I also added in a little macro so that we could reuse the existing constants for both new and old js constants.

@@ -428,9 +428,16 @@ class WebSocket: public EventTarget {
JSG_METHOD(deserializeAttachment);

JSG_STATIC_CONSTANT(READY_STATE_CONNECTING);
JSG_STATIC_CONSTANT_ALIAS(CONNECTING, WebSocket::READY_STATE_CONNECTING);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but I think JSG_STATIC_CONSTANT_NAMED would probably align better with some of the other macros

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bcaimano bcaimano force-pushed the bcaimano/web-socket-ready-state branch from 02323e2 to d96d644 Compare December 18, 2023 19:52
@bcaimano
Copy link
Contributor Author

bcaimano commented Dec 18, 2023

@bcaimano bcaimano force-pushed the bcaimano/web-socket-ready-state branch from d96d644 to 2821742 Compare December 18, 2023 19:53
@bcaimano bcaimano merged commit 1c63020 into main Dec 19, 2023
11 checks passed
@bcaimano bcaimano deleted the bcaimano/web-socket-ready-state branch December 19, 2023 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants