1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:17:35 +00:00

LibWeb: Add timeout functionality to ResourceLoader

Add timeout functionality to ResourceLoader and use it from
XMLHttpRequest.
This commit is contained in:
Kenneth Myhra 2022-04-27 21:28:59 +02:00 committed by Linus Groh
parent 8b42c05648
commit c805987329
3 changed files with 18 additions and 7 deletions

View file

@ -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();
}