MCPcopy Create free account
hub / github.com/ptmt/react-native-macos / setReadyState

Method setReadyState

Libraries/Network/XMLHttpRequest.js:536–553  ·  view source on GitHub ↗
(newState: number)

Source from the content-addressed store, hash-verified

534 }
535
536 setReadyState(newState: number): void {
537 this.readyState = newState;
538 this.dispatchEvent({type: 'readystatechange'});
539 if (newState === this.DONE) {
540 if (this._aborted) {
541 this.dispatchEvent({type: 'abort'});
542 } else if (this._hasError) {
543 if (this._timedOut) {
544 this.dispatchEvent({type: 'timeout'});
545 } else {
546 this.dispatchEvent({type: 'error'});
547 }
548 } else {
549 this.dispatchEvent({type: 'load'});
550 }
551 this.dispatchEvent({type: 'loadend'});
552 }
553 }
554
555 /* global EventListener */
556 addEventListener(type: string, listener: EventListener): void {

Callers 6

__didReceiveResponseMethod · 0.95
__didReceiveDataMethod · 0.95
__didCompleteResponseMethod · 0.95
openMethod · 0.95
abortMethod · 0.95

Calls 1

dispatchEventMethod · 0.45

Tested by

no test coverage detected