A communication channel between two documents from different domains. Provides asynchronous messaging.
extends goog.messaging.AbstractChannelInstance Method Summary | |
close() Closes the channel. | |
createPeerIframe(!Element parentElm, ?Function= opt_configureIframeCb, boolean= opt_addCfgParam) ⇒ !HTMLIFrameElement Creates the iframe containing the peer page in a specified parent element. This method does not connect the channel, connect() still has to be called separately. | |
createTransport_() Creates the transport for this channel. Chooses from the available transport based on the user agent and the configuration. | |
deliver_(string serviceName, string payload, string= opt_origin) Delivers messages to the appropriate service-handler. | |
determineTransportType_() ⇒ (goog.net.xpc.TransportTypes|null|undefined) Determine which transport type to use for this channel / useragent. | |
disposeInternal() Deletes or nulls out any references to COM objects, DOM nodes, or other disposable objects. Classes that extend {@code goog.Disposable} should override this method. Not reentrant. To avoid calling it twice, it must only be called from the subclass' {@code disposeInternal} method. Everywhere else the public {@code dispose} method must be used. For example: mypackage.MyClass = function() { goog.base(this); // Constructor logic specific to MyClass. ... }; goog.inherits(mypackage.MyClass, goog.Disposable); mypackage.MyClass.prototype.disposeInternal = function() { goog.base(this, 'disposeInternal'); // Dispose logic specific to MyClass. ... }; | |
escapeServiceName_(string name) ⇒ string Escape the user-provided service name for sending across the channel. This URL-encodes certain special characters so they don't conflict with delimiters used by some of the transports, and adds a special prefix if the name conflicts with the reserved transport service name. This is the opposite of {@link #unescapeServiceName_}. | |
getPeerConfiguration() ⇒ ?Object | |
getRole() ⇒ number Returns the role of this channel (either inner or outer). | |
getTransportName() ⇒ string Returns the tranport name in use for this channel. | |
getTransportType() ⇒ number Returns the transport type in use for this channel. | |
isMessageOriginAcceptable_(string= opt_origin) ⇒ boolean Returns whether an incoming message with the given origin is acceptable. If an incoming request comes with a specified (non-empty) origin, and the PEER_HOSTNAME config parameter has also been provided, the two must match, or the message is unacceptable. | |
notifyConnected_() Called by the transport when the channel is connected. | |
notifyTransportError_() Called by the transport in case of an unrecoverable failure. | |
setPeerWindowObject(?Object peerWindowObject) Sets the window object the foreign document resides in. | |
unescapeServiceName_(string name) ⇒ string Unescape the escaped service name that was sent across the channel. This is the opposite of {@link #escapeServiceName_}. |
Static Method Summary | |
disposeAll_() Disposes all channels. |