Skip to content

Add channel support #5

Description

@lawnsea

It would be good to provide an easy way for postMessage clients and servers to
ignore messages not intended for them. The right way to do this is natively with
MessageChannels, but FF doesn't support those and the polyfill from tilde adds a
lot of code we don't want in the TCB.[1]

So, if the config includes a channel value when the client/server is
constructed, include that value as channel when txing and ignore rxed messages
that do not have an identical channel value.

[1] We could use the same technique that we do for tiny-jsonrpc-postmessage,
which is to just implement the protocol w/o the library support in the trusted
code, but that may be complicated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions