src/courier/PostMessageChannel.js
function _wrapReadyCallback(onready, target) {
            return function(err) {
                if (target && "function" === typeof target.callback) {
                    target.callback.call(target.context, err, this.target);
                }
                if (onready) {
                    if ("function" === typeof onready) {
                        onready(err, this.target);
                    }
                    else if ("function" === typeof onready.callback) {
                        onready.callback.call(onready.context, err, this.target);
                    }
                }
            };
        }
function _wrapReadyCallback(onready, target) {
            return function(err) {
                if (target && "function" === typeof target.callback) {
                    target.callback.call(target.context, err, this.target);
                }
                if (onready) {
                    if ("function" === typeof onready) {
                        onready(err, this.target);
                    }
                    else if ("function" === typeof onready.callback) {
                        onready.callback.call(onready.context, err, this.target);
                    }
                }
            };
        }
function _wrapReadyCallback ( onready , target ) { return function ( err ) { if ( target && "function" === typeof target . callback ) { target . callback . call ( target . context , err , this . target ) ; } if ( onready ) { if ( "function" === typeof onready ) { onready ( err , this . target ) ; } else if ( "function" === typeof onready . callback ) { onready . callback . call ( onready . context , err , this . target ) ; } } } ; }
Method for wrapping the callback of iframe ready
@param {Function} [onready] - the handler for iframe ready
@param {Object} [target] - the target iframe configuration
@returns {Function} handler function for messages
@private
Method for wrapping the callback of iframe ready