src/courier/PostMessageCourier.js
function _initializeSerialization(options) {
                this.useObjects = false === options.useObjects ? options.useObjects : _getUseObjectsUrlIndicator();
                if ("undefined" === typeof this.useObjects) {
                    // Defaults to true
                    this.useObjects = true;
                }
                options.useObjects = this.useObjects;

                // Define the serialize/deserialize methods to be used
                if ("function" !== typeof options.serialize || "function" !== typeof options.deserialize) {
                    if (this.useObjects && PostMessageUtilities.hasPostMessageObjectsSupport()) {
                        this.serialize = _de$serializeDummy;
                        this.deserialize = _de$serializeDummy;
                    }
                    else {
                        this.serialize = PostMessageUtilities.stringify;
                        this.deserialize = JSON.parse;
                    }

                    options.serialize = this.serialize;
                    options.deserialize = this.deserialize;
                }
                else {
                    this.serialize = options.serialize;
                    this.deserialize = options.deserialize;
                }
            }
function _initializeSerialization(options) {
                this.useObjects = false === options.useObjects ? options.useObjects : _getUseObjectsUrlIndicator();
                if ("undefined" === typeof this.useObjects) {
                    // Defaults to true
                    this.useObjects = true;
                }
                options.useObjects = this.useObjects;

                // Define the serialize/deserialize methods to be used
                if ("function" !== typeof options.serialize || "function" !== typeof options.deserialize) {
                    if (this.useObjects && PostMessageUtilities.hasPostMessageObjectsSupport()) {
                        this.serialize = _de$serializeDummy;
                        this.deserialize = _de$serializeDummy;
                    }
                    else {
                        this.serialize = PostMessageUtilities.stringify;
                        this.deserialize = JSON.parse;
                    }

                    options.serialize = this.serialize;
                    options.deserialize = this.deserialize;
                }
                else {
                    this.serialize = options.serialize;
                    this.deserialize = options.deserialize;
                }
            }
function _initializeSerialization ( options ) { this . useObjects = false === options . useObjects ? options . useObjects : _getUseObjectsUrlIndicator ( ) ; if ( "undefined" === typeof this . useObjects ) { // Defaults to true this . useObjects = true ; } options . useObjects = this . useObjects ; // Define the serialize/deserialize methods to be used if ( "function" !== typeof options . serialize || "function" !== typeof options . deserialize ) { if ( this . useObjects && PostMessageUtilities . hasPostMessageObjectsSupport ( ) ) { this . serialize = _de$serializeDummy ; this . deserialize = _de$serializeDummy ; } else { this . serialize = PostMessageUtilities . stringify ; this . deserialize = JSON . parse ; } options . serialize = this . serialize ; options . deserialize = this . deserialize ; } else { this . serialize = options . serialize ; this . deserialize = options . deserialize ; } }
Method for initializing the options for serialization of messages
@param {Boolean} [options.useObjects = true upon browser support] - optional indication for passing objects by reference
@param {Function} [options.serialize = JSON.stringify] - optional serialization method for post message
@param {Function} [options.deserialize = JSON.parse] - optional deserialization method for post message
@private
Method for initializing the options for serialization of messages