Track XHR replacements correctly (#2455)

* Track XHR replacements correctly

Fixes #2439

* Update docs [skip ci]
This commit is contained in:
Isiah Meadows 2019-07-05 19:50:51 -04:00 committed by GitHub
parent 7eee730c29
commit 8eed896859
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 134 additions and 35 deletions

View file

@ -72,7 +72,7 @@ module.exports = function() {
self.readyState = 4
if (args.async === true) {
callAsync(function() {
if (typeof self.onreadystatechange === "function") self.onreadystatechange()
if (typeof self.onreadystatechange === "function") self.onreadystatechange({target: self})
})
}
}