Fix typos in 5.8 (XMLHttpRequest)

This commit is contained in:
Vse Mozhe Buty 2020-11-28 19:52:12 +02:00 committed by GitHub
parent 6ec4c4fc99
commit b79964ad8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -93,7 +93,7 @@ xhr.onload = function() {
if (xhr.status != 200) { // analyze HTTP status of the response
alert(`Error ${xhr.status}: ${xhr.statusText}`); // e.g. 404: Not Found
} else { // show the result
alert(`Done, got ${xhr.response.length} bytes`); // response is the server
alert(`Done, got ${xhr.response.length} bytes`); // response is the server response
}
};
@ -190,7 +190,7 @@ All states, as in [the specification](https://xhr.spec.whatwg.org/#states):
UNSENT = 0; // initial state
OPENED = 1; // open called
HEADERS_RECEIVED = 2; // response headers received
LOADING = 3; // response is loading (a data packed is received)
LOADING = 3; // response is loading (a data packet is received)
DONE = 4; // request complete
```