mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibWeb: Add document_fully_loaded event to DocumentObserver
SVGUseElement needs to be able to query the fully loaded document for its referenced element.
This commit is contained in:
committed by
Andreas Kling
parent
31d536912c
commit
b322abd8d0
@@ -1679,6 +1679,11 @@ void Document::completely_finish_loading()
|
||||
container->dispatch_event(DOM::Event::create(container->realm(), HTML::EventNames::load).release_value_but_fixme_should_propagate_errors());
|
||||
});
|
||||
}
|
||||
|
||||
for (auto& document_observer : m_document_observers) {
|
||||
if (document_observer->document_fully_loaded)
|
||||
document_observer->document_fully_loaded();
|
||||
}
|
||||
}
|
||||
|
||||
DeprecatedString Document::cookie(Cookie::Source source)
|
||||
|
||||
@@ -18,6 +18,7 @@ class DocumentObserver final : public Bindings::PlatformObject {
|
||||
|
||||
public:
|
||||
JS::SafeFunction<void()> document_became_inactive;
|
||||
JS::SafeFunction<void()> document_fully_loaded;
|
||||
|
||||
private:
|
||||
explicit DocumentObserver(JS::Realm&, DOM::Document&);
|
||||
|
||||
Reference in New Issue
Block a user