mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibWeb: Add a DocumentObserver hook to be notified of readyState changes
This commit is contained in:
parent
44b1c4f2b5
commit
0bbe836f8c
Notes:
github-actions[bot]
2024-10-26 09:27:09 +00:00
Author: https://github.com/trflynn89
Commit: 0bbe836f8c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1967
3 changed files with 18 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue