src/courier/PostMessageChannel.js
function _waitForBody(options) {
            options = options || {};
            var onready = options.onready;
            var doc = options.doc || root.document;
            var delay = options.delay;

            function _ready() {
                if (doc.body) {
                    onready();
                }
                else {
                    PostMessageUtilities.delay(_ready, delay || DEFAULT_BODY_LOAD_DELAY);
                }
            }

            PostMessageUtilities.delay(_ready, delay || false);
        }
function _waitForBody(options) {
            options = options || {};
            var onready = options.onready;
            var doc = options.doc || root.document;
            var delay = options.delay;

            function _ready() {
                if (doc.body) {
                    onready();
                }
                else {
                    PostMessageUtilities.delay(_ready, delay || DEFAULT_BODY_LOAD_DELAY);
                }
            }

            PostMessageUtilities.delay(_ready, delay || false);
        }
function _waitForBody ( options ) { options = options || { } ; var onready = options . onready ; var doc = options . doc || root . document ; var delay = options . delay ; function _ready ( ) { if ( doc . body ) { onready ( ) ; } else { PostMessageUtilities . delay ( _ready , delay || DEFAULT_BODY_LOAD_DELAY ) ; } } PostMessageUtilities . delay ( _ready , delay || false ) ; }
Method to enable running a callback once the document body is ready
@param {Object} [options] Configuration options
@param {Function} options.onready - the callback to run when ready
@param {Object} [options.doc = root.document] - document to refer to
@param {Number} [options.delay = 0] - milliseconds to delay the execution
@private
Method to enable running a callback once the document body is ready