1 function Sys$Net$XMLHttpExecutor$abort() {
3 if (arguments.length !== 0) throw Error.parameterCount();
4 if (!this._started) {
5 throw Error.invalidOperation(Sys.Res.cannotAbortBeforeStart);
6 }
7 if (this._aborted || this._responseAvailable || this._timedOut)
8 return;
9 this._aborted = true;
10 this._clearTimer();
11 if (this._xmlHttpRequest && !this._responseAvailable) {
12 this._xmlHttpRequest.onreadystatechange = Function.emptyMethod;
13 this._xmlHttpRequest.abort();
14
15 this._xmlHttpRequest = null;
16 this._webRequest.completed(Sys.EventArgs.Empty);
17 }
18 }