src/aria/core/IO.js
function (xhrObject, callback, isTimeout) {
            if (!xhrObject) {
                return false;
            }

            var transaction = xhrObject.redId || xhrObject;
            var request = this.pendingRequests[transaction];

            this.clearTimeout(transaction);

            var abortStatus = false;
            if (xhrObject.getStatus) {
                var statusCallback = xhrObject.getStatus;
                abortStatus = statusCallback.fn.apply(statusCallback.scope, statusCallback.args);
            }

            if (request) {
                abortStatus = true;

                if (xhrObject === transaction) {
                    xhrObject = {
                        transaction : transaction
                    };
                } else {
                    xhrObject.transaction = transaction;
                }
            }

            if (abortStatus === true) {
                // Fire global custom event -- abortEvent
                this.$raiseEvent({
                    name : "abortEvent",
                    o : xhrObject,
                    req : request
                });

                var response = {
                    transaction : request.id,
                    req : request,
                    status : isTimeout ? this.COMM_CODE : this.ABORT_CODE,
                    statusText : isTimeout ? this.TIMEOUT_ERROR : this.ABORT_ERROR
                };

                this._handleResponse(true, request, response);
            }

            return abortStatus;
        }
function (xhrObject, callback, isTimeout) {
            if (!xhrObject) {
                return false;
            }

            var transaction = xhrObject.redId || xhrObject;
            var request = this.pendingRequests[transaction];

            this.clearTimeout(transaction);

            var abortStatus = false;
            if (xhrObject.getStatus) {
                var statusCallback = xhrObject.getStatus;
                abortStatus = statusCallback.fn.apply(statusCallback.scope, statusCallback.args);
            }

            if (request) {
                abortStatus = true;

                if (xhrObject === transaction) {
                    xhrObject = {
                        transaction : transaction
                    };
                } else {
                    xhrObject.transaction = transaction;
                }
            }

            if (abortStatus === true) {
                // Fire global custom event -- abortEvent
                this.$raiseEvent({
                    name : "abortEvent",
                    o : xhrObject,
                    req : request
                });

                var response = {
                    transaction : request.id,
                    req : request,
                    status : isTimeout ? this.COMM_CODE : this.ABORT_CODE,
                    statusText : isTimeout ? this.TIMEOUT_ERROR : this.ABORT_ERROR
                };

                this._handleResponse(true, request, response);
            }

            return abortStatus;
        }
function ( xhrObject , callback , isTimeout ) { if ( ! xhrObject ) { return false ; } var transaction = xhrObject . redId || xhrObject ; var request = this . pendingRequests [ transaction ] ; this . clearTimeout ( transaction ) ; var abortStatus = false ; if ( xhrObject . getStatus ) { var statusCallback = xhrObject . getStatus ; abortStatus = statusCallback . fn . apply ( statusCallback . scope , statusCallback . args ) ; } if ( request ) { abortStatus = true ; if ( xhrObject === transaction ) { xhrObject = { transaction : transaction } ; } else { xhrObject . transaction = transaction ; } } if ( abortStatus === true ) { // Fire global custom event -- abortEvent this . $raiseEvent ( { name : "abortEvent" , o : xhrObject , req : request } ) ; var response = { transaction : request . id , req : request , status : isTimeout ? this . COMM_CODE : this . ABORT_CODE , statusText : isTimeout ? this . TIMEOUT_ERROR : this . ABORT_ERROR } ; this . _handleResponse ( true , request , response ) ; } return abortStatus ; }
Method to terminate a transaction, if it has not reached readyState 4.
@param {Object|String} xhrObject The connection object returned by asyncRequest or the Request identifier.
@param {Object} callback User-defined callback object.
@param {String} isTimeout boolean to indicate if abort resulted from a callback timeout.
@return {Boolean}
Method to terminate a transaction if it has not reached readyState 4 .