src/sap.ui.core/src/sap/ui/base/syncXHRFix.js
function wrapHandler(fnHandler) {
						var fnWrappedHandler = function(oEvent) {
							// The ready state at the time the event is occurring needs to
							// be preserved, to restore it when the handler is called delayed
							var iCurrentState = oXHR.readyState;
							function callHandler() {
								iReadyState = iCurrentState;
								// Only if the event has not been removed in the meantime
								// the handler needs to be called after the timeout
								if (fnWrappedHandler.active) {
									return fnHandler.call(oProxy, oEvent);
								}
							}
							// If this is an asynchronous request and a sync request is ongoing,
							// the execution of all following handler calls needs to be delayed
							if (!bSync && bSyncRequestOngoing) {
								bDelay = true;
							}
							if (bDelay) {
								_timeout(callHandler, 0);
								return true;
							}
							return callHandler();
						};
						fnHandler.wrappedHandler = fnWrappedHandler;
						fnWrappedHandler.active = true;
						return fnWrappedHandler;
					}
function wrapHandler(fnHandler) {
						var fnWrappedHandler = function(oEvent) {
							// The ready state at the time the event is occurring needs to
							// be preserved, to restore it when the handler is called delayed
							var iCurrentState = oXHR.readyState;
							function callHandler() {
								iReadyState = iCurrentState;
								// Only if the event has not been removed in the meantime
								// the handler needs to be called after the timeout
								if (fnWrappedHandler.active) {
									return fnHandler.call(oProxy, oEvent);
								}
							}
							// If this is an asynchronous request and a sync request is ongoing,
							// the execution of all following handler calls needs to be delayed
							if (!bSync && bSyncRequestOngoing) {
								bDelay = true;
							}
							if (bDelay) {
								_timeout(callHandler, 0);
								return true;
							}
							return callHandler();
						};
						fnHandler.wrappedHandler = fnWrappedHandler;
						fnWrappedHandler.active = true;
						return fnWrappedHandler;
					}
function wrapHandler ( fnHandler ) { var fnWrappedHandler = function ( oEvent ) { // The ready state at the time the event is occurring needs to // be preserved, to restore it when the handler is called delayed var iCurrentState = oXHR . readyState ; function callHandler ( ) { iReadyState = iCurrentState ; // Only if the event has not been removed in the meantime // the handler needs to be called after the timeout if ( fnWrappedHandler . active ) { return fnHandler . call ( oProxy , oEvent ) ; } } // If this is an asynchronous request and a sync request is ongoing, // the execution of all following handler calls needs to be delayed if ( ! bSync && bSyncRequestOngoing ) { bDelay = true ; } if ( bDelay ) { _timeout ( callHandler , 0 ) ; return true ; } return callHandler ( ) ; } ; fnHandler . wrappedHandler = fnWrappedHandler ; fnWrappedHandler . active = true ; return fnWrappedHandler ; }
Return a wrapped handler function for the given function, which checks whether a synchronous request is currently in progress.
Return a wrapped handler function for the given function which checks whether a synchronous request is currently in progress .