mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
LibWeb: Add Document.hasFocus() stub
This always returns true for now. A proper implementation needs to check if the document is in the focused widget within an active window.
This commit is contained in:
parent
90a8744823
commit
545ec334f0
Notes:
sideshowbarker
2024-07-17 19:50:23 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/545ec334f00
@ -1147,4 +1147,10 @@ NonnullRefPtr<DOMImplementation> Document::implementation() const
|
||||
return *m_implementation;
|
||||
}
|
||||
|
||||
bool Document::has_focus() const
|
||||
{
|
||||
// FIXME: Return whether we actually have focus.
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -304,6 +304,8 @@ public:
|
||||
void evaluate_media_queries_and_report_changes();
|
||||
void add_media_query_list(NonnullRefPtr<CSS::MediaQueryList>&);
|
||||
|
||||
bool has_focus() const;
|
||||
|
||||
private:
|
||||
explicit Document(const AK::URL&);
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user