The XHRLoader will now listen for ontimeout and if triggered it will hand over to the File.onError handler. This prevents the Loader from stalling if a file times out. Fix #6472

This commit is contained in:
Richard Davey 2024-02-01 17:30:10 +00:00
parent e920685102
commit 5bda070c98

View file

@ -63,6 +63,7 @@ var XHRLoader = function (file, globalXHRSettings)
xhr.onload = file.onLoad.bind(file, xhr);
xhr.onerror = file.onError.bind(file, xhr);
xhr.onprogress = file.onProgress.bind(file);
xhr.ontimeout = file.onError.bind(file, xhr);
// This is the only standard method, the ones above are browser additions (maybe not universal?)
// xhr.onreadystatechange