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 W3C Caveat to Browser Support Info #412

Merged
merged 1 commit into from
Dec 10, 2021

Conversation

baileytincher
Copy link
Contributor

@baileytincher baileytincher commented Mar 12, 2021

The README states that "All current browsers are fully supported", which is not technically true. As noted in the docs

When running in a browser (for example by using browserify) the browser's native WebSocket implementation is used, and thus just the first and second arguments (requestUrl and requestedProtocols) are used (those allowed by the W3C WebSocket API).

As someone who was not familiar with this, I spent a lot of time trying to debug the inconsistencies with the library between Node and the Browser.

Even better would be if there were a way to throw an error when someone tries to pass headers, etc. into the W3C client from the browser.

@wachidsusilo
Copy link

So this is why my 'Authorization' header was missing on server side. Is there any workaround to pass header? @baileytincher

@ibc
Copy link
Collaborator

ibc commented Dec 10, 2021

Guys, it's clear that the docs explain that limitation (which is not a limitation in this library but in the W3C WebSocket interface). What you are asking is like "make this library warn the user if he didn't read the docs". We shouldn't need to cover that. We write docs for something.

@ibc ibc closed this Dec 10, 2021
@ibc
Copy link
Collaborator

ibc commented Dec 10, 2021

Sorry, now I've realized that this is a PR rather than an issue. Reopening and merging.

@ibc ibc reopened this Dec 10, 2021
@ibc ibc merged commit cce6d46 into theturtle32:master Dec 10, 2021
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