1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:27:45 +00:00

LibWeb: Update Document::is_active() for navigables

This commit is contained in:
Aliaksandr Kalenik 2023-08-14 20:17:21 +02:00 committed by Andreas Kling
parent e5302e0f56
commit bd119b92f1

View file

@ -2025,11 +2025,9 @@ bool Document::is_fully_active() const
return false;
}
// https://html.spec.whatwg.org/multipage/browsers.html#active-document
bool Document::is_active() const
{
// A browsing context's active document is its active window's associated Document.
return browsing_context() && browsing_context()->active_document() == this;
return navigable() && navigable()->active_document() == this;
}
// https://html.spec.whatwg.org/multipage/history.html#dom-document-location