1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update components

This commit is contained in:
Luke Pulverenti 2016-01-18 14:07:26 -05:00
parent 047fd2b438
commit 6f96e87248
22 changed files with 472 additions and 303 deletions

View file

@ -49,7 +49,7 @@ class XhrLoader {
loadInternal() {
var xhr = this.loader = new XMLHttpRequest();
xhr.onreadystatechange = this.statechange.bind(this);
xhr.onloadend = this.loadend.bind(this);
xhr.onprogress = this.loadprogress.bind(this);
xhr.open('GET', this.url, true);
@ -65,13 +65,12 @@ class XhrLoader {
xhr.send();
}
statechange(event) {
loadend(event) {
var xhr = event.currentTarget,
status = xhr.status,
stats = this.stats;
// don't proceed if xhr has been aborted
// 4 = Response from server has been completely loaded.
if (!stats.aborted && xhr.readyState === 4) {
if (!stats.aborted) {
// http status between 200 to 299 are all successful
if (status >= 200 && status < 300) {
window.clearTimeout(this.timeoutHandle);