src/message.js

Method clear

Returns an Object
(abaaso)

clear : function ( state ) { state = state || "all"; return observer.remove( global, "message", "message", state ); },

Method send

Posts a message to the target

Parameters:

  • target must be an Object.
    (Object to receive message)

  • arg can be of any type.
    (Entity to send as message)

Returns an Object
(target)

send : function ( target, arg ) { try { target.postMessage( arg, "*" ); } catch ( e ) { utility.error( e, arguments, this ); } return target; },

Method recv

Sets a handler for recieving a message

Parameters:

  • fn must be a Function.
    (Callback function)

Returns an Object
(abaaso)

recv : function ( fn, state ) { state = state || "all"; return observer.add( global, "message", fn, "message", global, state ); } };