Skip to content
avoidwork edited this page Apr 24, 2012 · 1 revision

message

Simplifies cross window (iframe) message communication

message.clear

Clears the message listener

@return {Object} abaaso

Example

$.message.clear();

message.recv

Sets a handler for recieving a message

@param  {Function} fn  Callback function
@return {Object} abaaso

Example

$.message.recv(function (arg) {});

message.send

Posts a message to the target

@param  {Object} target Object to receive message
@param  {Mixed}  arg    Entity to send as message
@return {Object} target

Example

$.message.send($.encode({a:true, b:false, c:true}));