diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp index 86c597749b..313b75442e 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.cpp +++ b/Userland/Libraries/LibWeb/DOM/Document.cpp @@ -2882,6 +2882,8 @@ void Document::unload(JS::GCPtr) // FIXME: 21. If newDocument is given, newDocument's was created via cross-origin redirects is false, and newDocument's origin is the same as oldDocument's origin, then set // newDocument's previous document unload timing to unloadTimingInfo. + + did_stop_being_active_document_in_navigable(); } // https://html.spec.whatwg.org/multipage/iframe-embed-object.html#allowed-to-use @@ -2920,6 +2922,17 @@ void Document::did_stop_being_active_document_in_browsing_context(Badgedocument_became_inactive) + document_observer->document_became_inactive(); + } +} + // https://w3c.github.io/editing/docs/execCommand/#querycommandsupported() bool Document::query_command_supported(String const& command) const { diff --git a/Userland/Libraries/LibWeb/DOM/Document.h b/Userland/Libraries/LibWeb/DOM/Document.h index f3b6193ccd..83c77ac0b1 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.h +++ b/Userland/Libraries/LibWeb/DOM/Document.h @@ -503,6 +503,7 @@ public: bool is_allowed_to_use_feature(PolicyControlledFeature) const; void did_stop_being_active_document_in_browsing_context(Badge); + void did_stop_being_active_document_in_navigable(); bool query_command_supported(String const&) const;