Skip to content
lorenzos edited this page May 28, 2012 · 1 revision

For an usage example see HowTo or a complete Demo.

CrossDomainFragment

Implements:

  • Options
  • Events

Syntax and options:

var comm = new CrossDomainFragment(options);
  • options: (object) Options for the class. They are all listed below.
    • recipient: An <iframe> element or a window object (default window.parent).
    • pollingInterval: Defines the interval in milleseconds between each hash fragment check (default: 250). It has to be shorter than the minimum expected inteval between two incoming messages.

Events:

  • receive(message): A message has been received.
  • send(message): A message has been sent.

Methods:

  • send(message): Sends a message.
  • start(): Starts listening for incoming messages (called automatically).
  • stop(): Stops listening for incoming messages.
Clone this wiki locally