1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:17:45 +00:00

LibWeb: Add an accessor for the document's title element

This commit is contained in:
Timothy Flynn 2023-06-07 15:13:42 -04:00 committed by Andreas Kling
parent e8fde316f6
commit 43b3673198
2 changed files with 21 additions and 0 deletions

View file

@ -147,6 +147,7 @@ public:
HTML::HTMLHtmlElement* html_element();
HTML::HTMLHeadElement* head();
JS::GCPtr<HTML::HTMLTitleElement> title_element();
HTML::HTMLElement* body();
HTML::HTMLHtmlElement const* html_element() const
@ -159,6 +160,11 @@ public:
return const_cast<Document*>(this)->head();
}
JS::GCPtr<HTML::HTMLTitleElement const> title_element() const
{
return const_cast<Document*>(this)->title_element();
}
HTML::HTMLElement const* body() const
{
return const_cast<Document*>(this)->body();