MessagePort
s and WebWorker
s). 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.
![]()
No description.
|
code » | ||||
![]()
Create a PortChannel that communicates with a window embedded in the current
page (e.g. an iframe contentWindow). The code within the window should call
forGlobalWindow to establish the connection.
It's possible to use this channel in conjunction with other messages to the
embedded window. However, only one PortChannel should be used for a given
window at a time.
Arguments:
Returns: !goog.messaging.DeferredChannel
The PortChannel. Although this is
not actually an instance of the PortChannel class, it will behave like
one in that MessagePorts may be sent across it. The DeferredChannel may
be cancelled before a connection is established in order to abort the
attempt to make a connection.
|
code » | ||||
Create a PortChannel that communicates with the document in which this window
is embedded (e.g. within an iframe). The enclosing document should call
forEmbeddedWindow to establish the connection.
It's possible to use this channel in conjunction with other messages posted
to the global window. However, only one PortChannel should be used for the
global window at a time.
Arguments:
Returns: !goog.messaging.MessageChannel
The PortChannel. Although this may
not actually be an instance of the PortChannel class, it will behave like
one in that MessagePorts may be sent across it.
|
code » | ||||
![]()
No description.
|
code » |