mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-29 08:11:13 +00:00
LibWeb: Spin the HTML event loop when awaiting a navigable fetch
Spinning the HTML event loop allows microtasks to run (i.e. Promise completions).
This commit is contained in:
parent
bdb67d2bcb
commit
6f31a19c5f
Notes:
github-actions[bot]
2024-09-13 14:12:27 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/6f31a19c5f0 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1389 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/awesomekling ✅
|
@ -855,7 +855,7 @@ static WebIDL::ExceptionOr<Navigable::NavigationParamsVariant> create_navigation
|
||||||
}
|
}
|
||||||
|
|
||||||
// 7. Wait until either response is non-null, or navigable's ongoing navigation changes to no longer equal navigationId.
|
// 7. Wait until either response is non-null, or navigable's ongoing navigation changes to no longer equal navigationId.
|
||||||
Platform::EventLoopPlugin::the().spin_until([&]() {
|
HTML::main_thread_event_loop().spin_until([&]() {
|
||||||
if (response_holder->response() != nullptr)
|
if (response_holder->response() != nullptr)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue