src/aria/core/transport/XDR.js
function (reqId, callback) {
            // PROFILING // this.$stopMeasure(req.profilingId);

            // Check if Flash plugin is available
            var navigator = Aria.$global.navigator;
            if (navigator.plugins && navigator.plugins.length > 0) {
                var mime = navigator.mimeTypes, type = "application/x-shockwave-flash";
                if (!mime || !mime[type] || !mime[type].enabledPlugin) {
                    return this.$logError(this.IO_MISSING_FLASH_PLUGIN);
                }
            } else if (navigator.appVersion.indexOf("Mac") == -1 && Aria.$frameworkWindow.execScript) {
                try {
                    var ActiveXObject = Aria.$global.ActiveXObject;
                    var obj = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");

                    if (obj.activeXError) {
                        throw "ActiveXError";
                    }
                } catch (er) {
                    return this.$logError(this.IO_MISSING_FLASH_PLUGIN);
                }
            }

            // We're not ready, wait for the ready event to reissue the request, but cancel this request on timeout
            this._pending[reqId] = ariaCoreTimer.addCallback({
                fn : this._swfTimeout,
                scope : this,
                args : {
                    reqId : reqId,
                    cb : callback
                },
                delay : this.swfTimeout
            });

            if (!this._transport) {
                var swfUri = ariaCoreDownloadMgr.resolveURL('aria/resources/handlers/IO.swf');
                // note that the flash transport does not work with Safari if the following line is present in
                // parameters:
                // '<param name="wmode" value="transparent"/>'
                var obj = [
                        '<object id="xATIOSwf" type="application/x-shockwave-flash" data="',
                        swfUri,
                        '" width="1" height="1">',
                        '<param name="movie" value="' + swfUri + '" />',
                        '<param name="allowScriptAccess" value="always" />',
                        '<param name="FlashVars" value="readyCallback=' + this.$classpath + '.onXdrReady&handler='
                                + this.$classpath + '.handleXdrResponse" />', '</object>'].join("");

                var document = Aria.$frameworkWindow.document;
                var container = document.createElement('div');
                container.style.cssText = "position:fixed;top:-12000px;left:-12000px";
                document.body.appendChild(container);
                container.innerHTML = obj;

                this._transport = document.getElementById("xATIOSwf");
                this._transportContainer = container;
            }
        }
function (reqId, callback) {
            // PROFILING // this.$stopMeasure(req.profilingId);

            // Check if Flash plugin is available
            var navigator = Aria.$global.navigator;
            if (navigator.plugins && navigator.plugins.length > 0) {
                var mime = navigator.mimeTypes, type = "application/x-shockwave-flash";
                if (!mime || !mime[type] || !mime[type].enabledPlugin) {
                    return this.$logError(this.IO_MISSING_FLASH_PLUGIN);
                }
            } else if (navigator.appVersion.indexOf("Mac") == -1 && Aria.$frameworkWindow.execScript) {
                try {
                    var ActiveXObject = Aria.$global.ActiveXObject;
                    var obj = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");

                    if (obj.activeXError) {
                        throw "ActiveXError";
                    }
                } catch (er) {
                    return this.$logError(this.IO_MISSING_FLASH_PLUGIN);
                }
            }

            // We're not ready, wait for the ready event to reissue the request, but cancel this request on timeout
            this._pending[reqId] = ariaCoreTimer.addCallback({
                fn : this._swfTimeout,
                scope : this,
                args : {
                    reqId : reqId,
                    cb : callback
                },
                delay : this.swfTimeout
            });

            if (!this._transport) {
                var swfUri = ariaCoreDownloadMgr.resolveURL('aria/resources/handlers/IO.swf');
                // note that the flash transport does not work with Safari if the following line is present in
                // parameters:
                // '<param name="wmode" value="transparent"/>'
                var obj = [
                        '<object id="xATIOSwf" type="application/x-shockwave-flash" data="',
                        swfUri,
                        '" width="1" height="1">',
                        '<param name="movie" value="' + swfUri + '" />',
                        '<param name="allowScriptAccess" value="always" />',
                        '<param name="FlashVars" value="readyCallback=' + this.$classpath + '.onXdrReady&handler='
                                + this.$classpath + '.handleXdrResponse" />', '</object>'].join("");

                var document = Aria.$frameworkWindow.document;
                var container = document.createElement('div');
                container.style.cssText = "position:fixed;top:-12000px;left:-12000px";
                document.body.appendChild(container);
                container.innerHTML = obj;

                this._transport = document.getElementById("xATIOSwf");
                this._transportContainer = container;
            }
        }
function ( reqId , callback ) { // PROFILING // this.$stopMeasure(req.profilingId); // Check if Flash plugin is available var navigator = Aria . $global . navigator ; if ( navigator . plugins && navigator . plugins . length > 0 ) { var mime = navigator . mimeTypes , type = "application/x-shockwave-flash" ; if ( ! mime || ! mime [ type ] || ! mime [ type ] . enabledPlugin ) { return this . $logError ( this . IO_MISSING_FLASH_PLUGIN ) ; } } else if ( navigator . appVersion . indexOf ( "Mac" ) == - 1 && Aria . $frameworkWindow . execScript ) { try { var ActiveXObject = Aria . $global . ActiveXObject ; var obj = new ActiveXObject ( "ShockwaveFlash.ShockwaveFlash" ) ; if ( obj . activeXError ) { throw "ActiveXError" ; } } catch ( er ) { return this . $logError ( this . IO_MISSING_FLASH_PLUGIN ) ; } } // We're not ready, wait for the ready event to reissue the request, but cancel this request on timeout this . _pending [ reqId ] = ariaCoreTimer . addCallback ( { fn : this . _swfTimeout , scope : this , args : { reqId : reqId , cb : callback } , delay : this . swfTimeout } ) ; if ( ! this . _transport ) { var swfUri = ariaCoreDownloadMgr . resolveURL ( 'aria/resources/handlers/IO.swf' ) ; // note that the flash transport does not work with Safari if the following line is present in // parameters: // '<param name="wmode" value="transparent"/>' var obj = [ '<object id="xATIOSwf" type="application/x-shockwave-flash" data="' , swfUri , '" width="1" height="1">' , '<param name="movie" value="' + swfUri + '" />' , '<param name="allowScriptAccess" value="always" />' , '<param name="FlashVars" value="readyCallback=' + this . $classpath + '.onXdrReady&handler=' + this . $classpath + '.handleXdrResponse" />' , '</object>' ] . join ( "" ) ; var document = Aria . $frameworkWindow . document ; var container = document . createElement ( 'div' ) ; container . style . cssText = "position:fixed;top:-12000px;left:-12000px" ; document . body . appendChild ( container ) ; container . innerHTML = obj ; this . _transport = document . getElementById ( "xATIOSwf" ) ; this . _transportContainer = container ; } }
Inizialization function.
@param {String} reqId Request identifier
@param {aria.core.CfgBeans:Callback} callback This callback is generated by IO so it's already normalized
Inizialization function .