diff options
author | Andreas Kling <kling@serenityos.org> | 2021-09-27 16:02:13 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-27 16:52:22 +0200 |
commit | e26e85a3d24d9e570a35ac20bf043d6df47f3d0f (patch) | |
tree | eef8d4c9351c1445f9717b297262bb6d51226c06 /Userland/Libraries/LibWeb/DOM/Document.cpp | |
parent | 484f6a7cfa9129a221ec21ed0567c69a7abab7b2 (diff) | |
download | serenity-e26e85a3d24d9e570a35ac20bf043d6df47f3d0f.zip |
LibWeb: Support Document.hidden and Document.visibilityState
These just act as if the document is always visible for now.
Diffstat (limited to 'Userland/Libraries/LibWeb/DOM/Document.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/DOM/Document.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
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"; +} + } |