src/js/libs/spiritual-gui.js
function(a, key) {
			var prefix = "spiritual-action:";
			return prefix + (function() {
				a.target = null;
				a.data = (function(d) {
						if (gui.Type.isComplex(d)) {
							if (gui.Type.isFunction(d.stringify)) {
								d = d.stringify();
							} else {
								try {
									JSON.stringify(d);
								} catch (jsonexception) {
									d = null;
								}
							}
						}
						return d;
					}(a.data));
					a.instanceid = key || null;
					return JSON.stringify(a);
				}());
		}
function(a, key) {
			var prefix = "spiritual-action:";
			return prefix + (function() {
				a.target = null;
				a.data = (function(d) {
						if (gui.Type.isComplex(d)) {
							if (gui.Type.isFunction(d.stringify)) {
								d = d.stringify();
							} else {
								try {
									JSON.stringify(d);
								} catch (jsonexception) {
									d = null;
								}
							}
						}
						return d;
					}(a.data));
					a.instanceid = key || null;
					return JSON.stringify(a);
				}());
		}
function ( a , key ) { var prefix = "spiritual-action:" ; return prefix + ( function ( ) { a . target = null ; a . data = ( function ( d ) { if ( gui . Type . isComplex ( d ) ) { if ( gui . Type . isFunction ( d . stringify ) ) { d = d . stringify ( ) ; } else { try { JSON . stringify ( d ) ; } catch ( jsonexception ) { d = null ; } } } return d ; } ( a . data ) ) ; a . instanceid = key || null ; return JSON . stringify ( a ) ; } ( ) ) ; }
Encode action to be posted xdomain.
@param {gui.Action} a
@param @optional {String} key Associates dispatching document
to the hosting iframespirit (ascending action scenario)
@returns {String}
Encode action to be posted xdomain .