mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibWeb: Call did_finish_load when page readiness changes to complete
Before, this function were called from FrameLoader and now we have to move it to another place so it is still called after migrating to navigables.
This commit is contained in:
committed by
Andreas Kling
parent
2323c77718
commit
4a6ac18cd4
@@ -1893,6 +1893,12 @@ void Document::update_readiness(HTML::DocumentReadyState readiness_value)
|
||||
|
||||
// 4. Fire an event named readystatechange at document.
|
||||
dispatch_event(Event::create(realm(), HTML::EventNames::readystatechange));
|
||||
|
||||
if (readiness_value == HTML::DocumentReadyState::Complete && is_active() && navigable()->is_traversable()) {
|
||||
if (auto* page = navigable()->traversable_navigable()->page()) {
|
||||
page->client().page_did_finish_loading(url());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Page* Document::page()
|
||||
|
||||
Reference in New Issue
Block a user