mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:57:45 +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:
parent
2323c77718
commit
4a6ac18cd4
1 changed files with 6 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue