1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 21:57:35 +00:00

LibWeb: Rename loaded observer event to match spec

The `document_fully_loaded` event should use the adjective "completely"
so as to match the spec and code convention. See
`Document::is_completely_loaded` and `m_completely_loaded_time`.
This commit is contained in:
Sebastian Zaha 2023-07-12 11:19:08 +02:00 committed by Andreas Kling
parent bf3144fcff
commit d24667a1b6
3 changed files with 4 additions and 4 deletions

View file

@ -1774,8 +1774,8 @@ void Document::completely_finish_loading()
auto observers_to_notify = m_document_observers.values();
for (auto& document_observer : observers_to_notify) {
if (document_observer->document_fully_loaded)
document_observer->document_fully_loaded();
if (document_observer->document_completely_loaded)
document_observer->document_completely_loaded();
}
}

View file

@ -18,7 +18,7 @@ class DocumentObserver final : public Bindings::PlatformObject {
public:
JS::SafeFunction<void()> document_became_inactive;
JS::SafeFunction<void()> document_fully_loaded;
JS::SafeFunction<void()> document_completely_loaded;
private:
explicit DocumentObserver(JS::Realm&, DOM::Document&);

View file

@ -33,7 +33,7 @@ JS::ThrowCompletionOr<void> SVGUseElement::initialize(JS::Realm& realm)
set_shadow_root(shadow_root);
m_document_observer = TRY(realm.heap().allocate<DOM::DocumentObserver>(realm, realm, document()));
m_document_observer->document_fully_loaded = [this]() {
m_document_observer->document_completely_loaded = [this]() {
clone_element_tree_as_our_shadow_tree(referenced_element());
};