mirror of
https://github.com/copy/v86.git
synced 2025-12-31 04:23:15 +00:00
Better XHR error handling
This commit is contained in:
parent
bde9c7d491
commit
cdc52d7841
1 changed files with 9 additions and 3 deletions
|
|
@ -76,10 +76,16 @@ function dump_file(ab, name)
|
|||
|
||||
http.onload = function(e)
|
||||
{
|
||||
//if(http.readyState === 4 && http.status === 200)
|
||||
if(http.response)
|
||||
if(http.readyState === 4)
|
||||
{
|
||||
done(http.response);
|
||||
if(http.status !== 200)
|
||||
{
|
||||
log("Loading the image failed");
|
||||
}
|
||||
else if(http.response)
|
||||
{
|
||||
done(http.response);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue