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

add readyState constants to browser w3cwebsocket #282

Merged
merged 1 commit into from
Oct 18, 2017

Conversation

thechriswalker
Copy link
Contributor

Now the exposed w3cwebsocket export mirrors the native WebSocket more closely.
I hit this bug when moving previously native code to use this wrapper, the server-sde code was fine,
but the client-side code failed because WebSocket.OPEN was undefined.

Now the exposed `w3cwebsocket` export mirrors the native WebSocket more closely.
I hit this bug when moving previously native code to use this wrapper, the server-sde code was fine,
but the client-side code failed because `WebSocket.OPEN` was `undefined`.
@theturtle32 theturtle32 merged commit 5cb8273 into theturtle32:master Oct 18, 2017
@ibc
Copy link
Collaborator

ibc commented Oct 18, 2017

NOTE: The WebSocket API does not define WebSocket.OPEN, etc. Instead, those constants are defined as WebSocket instance read-only members/properties.

Anyhow, it's ok to support them since it seems that previous (draft?) versions of the spec did define them and some JS libs/apps still rely on them.

@theturtle32
Copy link
Owner

@ibc - I already merged this, perhaps too hastily, but does this make sense to you?

@theturtle32
Copy link
Owner

@ibc - Do you think this should stay?

@ibc
Copy link
Collaborator

ibc commented Oct 18, 2017

Do you think this should stay?

Yes, as argued in my latest comment :)

@theturtle32
Copy link
Owner

ok

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.

3 participants