PUBLIC

JavaScript MessageChannel : Object

A message channel allows sending messages between contexts such as two Workers by transferring the ports to the workers.

Constructors

new MessageChannel() : MessageChannel

Example:

Run

Results:

 

Instance Properties

port1 : MessagePort  

The first port the channel.

port2 : MessagePort  

The second port the channel.