mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibWeb: Add a DocumentObserver hook to be notified of readyState changes
This commit is contained in:
committed by
Andreas Kling
parent
44b1c4f2b5
commit
0bbe836f8c
@@ -2392,6 +2392,11 @@ void Document::update_readiness(HTML::DocumentReadyState readiness_value)
|
||||
m_needs_to_call_page_did_load = true;
|
||||
}
|
||||
}
|
||||
|
||||
for (auto document_observer : m_document_observers) {
|
||||
if (document_observer->document_readiness_observer())
|
||||
document_observer->document_readiness_observer()->function()(m_readiness);
|
||||
}
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/dom.html#dom-document-lastmodified
|
||||
|
||||
Reference in New Issue
Block a user