1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:57:35 +00:00

LibWeb: Add non-const variants of Document::{html_element,body,head}()

This commit is contained in:
Luke 2021-05-07 00:53:22 +01:00 committed by Andreas Kling
parent 46f2c278b0
commit b6004a4ce1
2 changed files with 22 additions and 6 deletions

View file

@ -91,9 +91,25 @@ public:
Element* document_element();
const Element* document_element() const;
const HTML::HTMLHtmlElement* html_element() const;
const HTML::HTMLHeadElement* head() const;
const HTML::HTMLElement* body() const;
HTML::HTMLHtmlElement* html_element();
HTML::HTMLHeadElement* head();
HTML::HTMLElement* body();
const HTML::HTMLHtmlElement* html_element() const
{
return const_cast<Document*>(this)->html_element();
}
const HTML::HTMLHeadElement* head() const
{
return const_cast<Document*>(this)->head();
}
const HTML::HTMLElement* body() const
{
return const_cast<Document*>(this)->body();
}
ExceptionOr<void> set_body(HTML::HTMLElement& new_body);
String title() const;