mirror of
https://github.com/status-im/react-native.git
synced 2025-02-10 08:26:23 +00:00
XMLHttpRequest.DONE is not defined. Fixes #5883
Summary:https://github.com/facebook/react-native/issues/5883 Closes https://github.com/facebook/react-native/pull/5895 Differential Revision: D2943443 Pulled By: androidtrunkagent fb-gh-sync-id: 1c1c1d69dd0ad4fb28f23fa956d843464f693b43 shipit-source-id: 1c1c1d69dd0ad4fb28f23fa956d843464f693b43
This commit is contained in:
parent
dab24b4a6c
commit
d8e07eab95
@ -14,11 +14,23 @@
|
|||||||
var RCTNetworking = require('RCTNetworking');
|
var RCTNetworking = require('RCTNetworking');
|
||||||
var RCTDeviceEventEmitter = require('RCTDeviceEventEmitter');
|
var RCTDeviceEventEmitter = require('RCTDeviceEventEmitter');
|
||||||
|
|
||||||
|
const UNSENT = 0;
|
||||||
|
const OPENED = 1;
|
||||||
|
const HEADERS_RECEIVED = 2;
|
||||||
|
const LOADING = 3;
|
||||||
|
const DONE = 4;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shared base for platform-specific XMLHttpRequest implementations.
|
* Shared base for platform-specific XMLHttpRequest implementations.
|
||||||
*/
|
*/
|
||||||
class XMLHttpRequestBase {
|
class XMLHttpRequestBase {
|
||||||
|
|
||||||
|
static UNSENT: number;
|
||||||
|
static OPENED: number;
|
||||||
|
static HEADERS_RECEIVED: number;
|
||||||
|
static LOADING: number;
|
||||||
|
static DONE: number;
|
||||||
|
|
||||||
UNSENT: number;
|
UNSENT: number;
|
||||||
OPENED: number;
|
OPENED: number;
|
||||||
HEADERS_RECEIVED: number;
|
HEADERS_RECEIVED: number;
|
||||||
@ -50,11 +62,11 @@ class XMLHttpRequestBase {
|
|||||||
_lowerCaseResponseHeaders: Object;
|
_lowerCaseResponseHeaders: Object;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.UNSENT = 0;
|
this.UNSENT = UNSENT;
|
||||||
this.OPENED = 1;
|
this.OPENED = OPENED;
|
||||||
this.HEADERS_RECEIVED = 2;
|
this.HEADERS_RECEIVED = HEADERS_RECEIVED;
|
||||||
this.LOADING = 3;
|
this.LOADING = LOADING;
|
||||||
this.DONE = 4;
|
this.DONE = DONE;
|
||||||
|
|
||||||
this.onreadystatechange = null;
|
this.onreadystatechange = null;
|
||||||
this.onload = null;
|
this.onload = null;
|
||||||
@ -265,4 +277,10 @@ class XMLHttpRequestBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
XMLHttpRequestBase.UNSENT = UNSENT;
|
||||||
|
XMLHttpRequestBase.OPENED = OPENED;
|
||||||
|
XMLHttpRequestBase.HEADERS_RECEIVED = HEADERS_RECEIVED;
|
||||||
|
XMLHttpRequestBase.LOADING = LOADING;
|
||||||
|
XMLHttpRequestBase.DONE = DONE;
|
||||||
|
|
||||||
module.exports = XMLHttpRequestBase;
|
module.exports = XMLHttpRequestBase;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user