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

Browserify-compatible #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Browserify-compatible #56

wants to merge 1 commit into from

Conversation

Reggino
Copy link

@Reggino Reggino commented Apr 11, 2015

Thank your for this, this stuff is awesome.

It can be used in the browser too! Browserify can be used to get it in the browser, but a minor tweak is needed. faye-websocket is not browserify-compatible and not needed since most modern browsers have WebSocket abilities themselves.

@Batistleman
Copy link

+1

2 similar comments
@c58
Copy link

c58 commented Aug 31, 2015

+1

@flippyhead
Copy link

👍

@vsivsi
Copy link
Member

vsivsi commented Oct 19, 2015

If many people want this, the fastest way to make it happen will be for someone to put together a PR with the changes Given that this has been sitting here for 6 months, there doesn't appear to be sufficient interest among the maintainers to take the time to do it (myself included).
Edited because apparently I'm not very observant sometimes...

@flippyhead
Copy link

But this is a PR with those changes. Only someone with write access can accept and merge it though..

@vsivsi
Copy link
Member

vsivsi commented Oct 19, 2015

Doh, I clearly didn't get enough sleep last night...

@vsivsi
Copy link
Member

vsivsi commented Oct 19, 2015

@flippyhead I can only speak for myself, but the issue here is that adding browser support massively increases the test/validation/support surface of this package. It would be trivial to merge this PR and push a new version of the package to npm. But highly non-trivial to ensure that it works correctly on every browser implementing websockets. And what happens with older browsers?

I guess what I'm saying is that this feels more experimental than production, and tons of production things depend on this package, So absent someone who is willing to make the effort to (re)write all of the test cases for the browser environment, and then actually test across a bunch of different browsers, and also commit to fielding the inevitable questions and fix the issues that arise...

My 2¢ on why nobody has jumped on it (myself included).

var WebSocket;

var isBrowserified = (typeof window !== 'undefined');
if (isBrowserified) {
Copy link
Member

Choose a reason for hiding this comment

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

I feel like the presence of window.Websocket should be the actual test here. And code should be added to detect when it is being run in a non-Websocket implementing browser and do something more helpful that throwing during package load on the absence of window.Websocket (which is presumably what happens now in that case)

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.

None yet

5 participants