mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
LibWeb: Add timeout functionality to ResourceLoader
Add timeout functionality to ResourceLoader and use it from XMLHttpRequest.
This commit is contained in:
parent
8b42c05648
commit
c805987329
3 changed files with 18 additions and 7 deletions
|
@ -637,7 +637,8 @@ DOM::ExceptionOr<void> XMLHttpRequest::send(String body)
|
|||
xhr.set_ready_state(ReadyState::Done);
|
||||
xhr.set_status(status_code.value_or(0));
|
||||
xhr.dispatch_event(DOM::Event::create(HTML::EventNames::error));
|
||||
});
|
||||
},
|
||||
m_timeout);
|
||||
} else {
|
||||
TODO();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue