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

Method _setReadyState

packages/core/xhr/index.ts:149–159  ·  view source on GitHub ↗
(value: number)

Source from the content-addressed store, hash-verified

147 }
148
149 private _setReadyState(value: number) {
150 if (this._readyState !== value) {
151 this._readyState = value;
152 this.emitEvent('readystatechange');
153 }
154
155 if (this._readyState === this.DONE) {
156 this.emitEvent('load');
157 this.emitEvent('loadend');
158 }
159 }
160
161 private _setRequestError(eventName: string, error?: any) {
162 this._readyState = this.DONE;

Callers 3

_loadResponseMethod · 0.95
openMethod · 0.95
test_xhr_eventsFunction · 0.80

Calls 1

emitEventMethod · 0.95

Tested by

no test coverage detected