MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / abort

Method abort

packages/core/xhr/index.ts:208–223  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

206 }
207
208 public abort() {
209 this._response = null;
210 this._responseTextReader = null;
211 this._headers = null;
212 this._status = null;
213
214 if ((this._readyState === this.OPENED && this._sendFlag) || this._readyState === this.HEADERS_RECEIVED || this._readyState === this.LOADING) {
215 this._errorFlag = true;
216 this._sendFlag = false;
217 this._setRequestError('abort');
218 }
219
220 if (this._readyState === this.DONE) {
221 this._readyState = this.UNSENT;
222 }
223 }
224
225 public send(data?: any) {
226 this._errorFlag = false;

Calls 1

_setRequestErrorMethod · 0.95

Tested by

no test coverage detected