search

goog.messaging.PortChannel

Provided By
Extends
All Implemented Interfaces

A wrapper for several types of HTML5 message-passing entities (MessagePorts and Workers). This class implements the goog.messaging.MessageChannel interface.

This class can be used in conjunction with other communication on the port. It sets goog.messaging.PortChannel.FLAG to true on all messages it sends.

new PortChannel( underlyingPort )

Parameters
underlyingPort(MessagePort|Worker)

The message-passing entity to wrap. If this is a MessagePort, it should be started. The remote end should also be wrapped in a PortChannel. This will be disposed along with the PortChannel; this means terminating it if it's a worker or removing it from the DOM if it's an iframe.

Instance Methods

Instance Properties

Static Functions

Static Properties