From e26e85a3d24d9e570a35ac20bf043d6df47f3d0f Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 27 Sep 2021 16:02:13 +0200 Subject: LibWeb: Support Document.hidden and Document.visibilityState These just act as if the document is always visible for now. --- Userland/Libraries/LibWeb/DOM/Document.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Userland/Libraries/LibWeb/DOM/Document.cpp') diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp index 3c1dd8a464..875a36e0a4 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.cpp +++ b/Userland/Libraries/LibWeb/DOM/Document.cpp @@ -1062,4 +1062,16 @@ Bindings::LocationObject* Document::location() return window().wrapper()->location_object(); } +// https://w3c.github.io/page-visibility/#hidden-attribute +bool Document::hidden() const +{ + return false; +} + +// https://w3c.github.io/page-visibility/#visibilitystate-attribute +String Document::visibility_state() const +{ + return hidden() ? "hidden" : "visible"; +} + } -- cgit v1.2.3