1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:27:44 +00:00

LibWeb: Report if anything is delaying load event, not the count

Some elements that delay the load event are more complicated than a
simple count will allow for. We'll implement those in a bit!
This commit is contained in:
Sam Atkins 2023-11-24 15:18:57 +00:00 committed by Andreas Kling
parent 6154681718
commit 6c5450f9ce
5 changed files with 14 additions and 4 deletions

View file

@ -219,7 +219,7 @@ void XMLDocumentBuilder::document_end()
// Spin the event loop until there is nothing that delays the load event in the Document.
HTML::main_thread_event_loop().spin_until([&] {
return m_document->number_of_things_delaying_the_load_event() == 0;
return !m_document->anything_is_delaying_the_load_event();
});
// Queue a global task on the DOM manipulation task source given the Document's relevant global object to run the following steps: