Skip to content
ifandelse edited this page Jan 13, 2013 · 2 revisions

##XFrameClient The constructor function for an object that acts as the proxy for a remote window. XFrameClient extends the base FederationClient constructor and prototype, and will contain any instance and prototype members that constructor provides. When signalReady() is invoked, any target iframes/windows will be communicated with through an instance of XFrameClient. If a remote window signals ready to this window, an instance of XFrameClient will be created to facilitate that communication as well.

Members

Since XFrameClient extends FederationClient, this page will only discuss the members overridden by XFrameClient.

  • transportName - instance member indicating the name of the transport plugin ("xframe") that created the instance.
  • shouldProcess() - method called when inbound or outbound messages are about to be processed. If it returns true (i.e. - if the sending/target origin is in the allowedOrigins array and/or if the xframe plugin is enabled, etc.), the processing continues, otherwise it aborts.
  • send( packingSlip ) - each federation plugin has to provide a send implementation for how messages are transmitted on that transport. This implementation wraps a call to window.postMessage. The packingSlip argument is the message that will be sent to the remote instance(s). (See postal.federation's wiki for more information on the kinds of packing slips that can be transmitted.)

Clone this wiki locally