Class MessageChannel
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The MessageChannel interface of the Channel Messaging API allows us to create a new message channel and send data through it via its two MessagePort properties.
[Value("MessageChannel")]
public class MessageChannel
- Inheritance
-
MessageChannel
- Inherited Members
Remarks
Constructors
MessageChannel()
The MessageChannel() constructor of the MessageChannel
interface returns a new MessageChannel object with two new
MessagePort objects.
public MessageChannel()
Remarks
Properties
Port1
The port1 read-only property of the
MessageChannel interface returns the first port of the message channel —
the port attached to the context that originated the channel.
[Value("port1")]
public MessagePort Port1 { get; }
Property Value
- MessagePort
A MessagePort object, the first port of the channel, that is the port
attached to the context that originated the channel.
Remarks
Port2
The port2 read-only property of the
MessageChannel interface returns the second port of the message channel —
the port attached to the context at the other end of the channel, which the message is
initially sent to.
[Value("port2")]
public MessagePort Port2 { get; }
Property Value
- MessagePort
A MessagePort object representing the second port of the channel, the
port attached to the context at the other end of the channel.