mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
XMLHttpRequest fix readyState during onabort callback (#1567)
* fix http request readyState after abort() * ignoreonreadystatechange when abort
This commit is contained in:
@@ -244,7 +244,7 @@ void XMLHttpRequest::abort()
|
||||
|
||||
_isAborted = true;
|
||||
|
||||
setReadyState(ReadyState::UNSENT);
|
||||
setReadyState(ReadyState::DONE);
|
||||
|
||||
if (onabort != nullptr)
|
||||
{
|
||||
@@ -256,6 +256,8 @@ void XMLHttpRequest::abort()
|
||||
{
|
||||
onloadend();
|
||||
}
|
||||
|
||||
_readyState = ReadyState::UNSENT;
|
||||
}
|
||||
|
||||
void XMLHttpRequest::setReadyState(ReadyState readyState)
|
||||
|
||||
Reference in New Issue
Block a user