mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 12:20:00 +01: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
|
|
@ -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 New Issue
Block a user