Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

Commit 9c3d947

Browse files
committed
Fix XMLHttpRequest static property
1 parent 8988cc8 commit 9c3d947

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/polyfill/XMLHttpRequest.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import XMLHttpRequestEventTarget from './XMLHttpRequestEventTarget.js'
77
import Log from '../utils/log.js'
88
import Blob from './Blob.js'
99
import ProgressEvent from './ProgressEvent.js'
10+
import URIUtil from '../utils/uri'
1011

1112
const log = new Log('XMLHttpRequest')
1213

@@ -124,10 +125,9 @@ export default class XMLHttpRequest extends XMLHttpRequestEventTarget{
124125
this._method = method
125126
this._url = url
126127
this._headers = {}
127-
this._increment = /^JSONStream\:\/\//.test(this._url)
128+
this._increment = URIUtil.isJSONStreamURI(this._url)
128129
this._url = this._url.replace(/^JSONStream\:\/\//, '')
129130
this._dispatchReadStateChange(XMLHttpRequest.OPENED)
130-
131131
}
132132

133133
/**
@@ -186,6 +186,7 @@ export default class XMLHttpRequest extends XMLHttpRequestEventTarget{
186186
.progress(this._progressEvent.bind(this))
187187
.catch(this._onError.bind(this))
188188
.then(this._onDone.bind(this))
189+
189190
})
190191
}
191192

@@ -424,7 +425,7 @@ export default class XMLHttpRequest extends XMLHttpRequestEventTarget{
424425
return this._responseType
425426
}
426427

427-
get isRNFBPolyfill() {
428+
static get isRNFBPolyfill() {
428429
return true
429430
}
430431

0 commit comments

Comments
 (0)