Interface MessageChannel

    This Channel Messaging API interface allows us to create a new message channel and send data through it via its two MessagePort properties.

    MDN Reference

    interface MessageChannel {
        port1: MessagePort;
        port2: MessagePort;
    }

    Properties

    Properties

    Returns the first MessagePort object.

    MDN Reference

    Returns the second MessagePort object.

    MDN Reference