diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp index f47bca16cb..6689fa5f43 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.cpp +++ b/Userland/Libraries/LibWeb/DOM/Document.cpp @@ -1147,4 +1147,10 @@ NonnullRefPtr Document::implementation() const return *m_implementation; } +bool Document::has_focus() const +{ + // FIXME: Return whether we actually have focus. + return true; +} + } diff --git a/Userland/Libraries/LibWeb/DOM/Document.h b/Userland/Libraries/LibWeb/DOM/Document.h index d8277447d2..371b204e39 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.h +++ b/Userland/Libraries/LibWeb/DOM/Document.h @@ -304,6 +304,8 @@ public: void evaluate_media_queries_and_report_changes(); void add_media_query_list(NonnullRefPtr&); + bool has_focus() const; + private: explicit Document(const AK::URL&); diff --git a/Userland/Libraries/LibWeb/DOM/Document.idl b/Userland/Libraries/LibWeb/DOM/Document.idl index 275a75941f..63ca8d0ff7 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.idl +++ b/Userland/Libraries/LibWeb/DOM/Document.idl @@ -2,6 +2,8 @@ interface Document : Node { constructor(); + boolean hasFocus(); + // FIXME: These attributes currently don't do anything. [PutForwards=href, LegacyUnforgeable] readonly attribute Location? location;