Skip to content
This repository was archived by the owner on Nov 2, 2020. It is now read-only.
This repository was archived by the owner on Nov 2, 2020. It is now read-only.

Overriding .onmessage triggers "cWS does not support multiple listeners" #46

@Rush

Description

@Rush

I wanted to handle first message differently then the rest:

const messageHandler = message => {
        handleDifferently(message);
        ws.onmessage = anotherMessageHandler;
      };
      ws.onmessage = messageHandler;
cWS does not support multiple listeners for the same event. Old listener for 'message' event will be overwritten

Expected: no warning issued

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions