LibWeb: Add support for document.lastModified

This commit is contained in:
Shannon Booth 2024-04-01 22:18:00 +02:00 committed by Andreas Kling
commit ce341c0230
Notes: sideshowbarker 2024-07-17 01:55:29 +09:00
3 changed files with 41 additions and 1 deletions

View file

@ -1,7 +1,7 @@
/*
* Copyright (c) 2018-2023, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021-2023, Linus Groh <linusg@serenityos.org>
* Copyright (c) 2023, Shannon Booth <shannon@serenityos.org>
* Copyright (c) 2023-2024, Shannon Booth <shannon@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -14,6 +14,7 @@
#include <AK/String.h>
#include <AK/Vector.h>
#include <AK/WeakPtr.h>
#include <LibCore/DateTime.h>
#include <LibCore/Forward.h>
#include <LibJS/Forward.h>
#include <LibURL/URL.h>
@ -323,6 +324,8 @@ public:
HTML::DocumentReadyState readiness() const { return m_readiness; }
void update_readiness(HTML::DocumentReadyState);
String last_modified() const;
[[nodiscard]] JS::GCPtr<HTML::Window> window() const { return m_window; }
void set_window(HTML::Window&);
@ -872,6 +875,8 @@ private:
Vector<JS::NonnullGCPtr<DOM::ShadowRoot>> m_shadow_roots;
Optional<Core::DateTime> m_last_modified;
u64 m_dom_tree_version { 0 };
// https://drafts.csswg.org/css-position-4/#document-top-layer