Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

avimak
Copy link

@avimak avimak commented May 28, 2019

@lukeed
Copy link
Owner

lukeed commented May 28, 2019

Hey there~!

Do you not like setting the property inside onopen? I mentioned that here: #18 (comment)

Not quite sure how I feel about this to be honest. I know it sounds silly, but ideologically, Sockette is just meant to enable easy reconnects. It should provision those listeners & be a doorway into the ws connection.

@avimak
Copy link
Author

avimak commented May 29, 2019

I don't mind setting it inside onopen, but since there were already existing methods which aren't related - directly - to reconnecting, i.e. -

    $.json = function (x) {
        ws.send(JSON.stringify(x));
    };

or -

    $.send = function (x) {
        ws.send(x);
    };

or even -

    ws.onmessage = opts.onmessage || noop;

I thought that adding binaryType to opts wouldn't break the current "paradigm".

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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.