mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:28:11 +00:00
LibWeb: Add non-const variants of Document::{html_element,body,head}()
This commit is contained in:
parent
46f2c278b0
commit
b6004a4ce1
2 changed files with 22 additions and 6 deletions
|
@ -184,7 +184,7 @@ const Element* Document::document_element() const
|
|||
return first_child_of_type<Element>();
|
||||
}
|
||||
|
||||
const HTML::HTMLHtmlElement* Document::html_element() const
|
||||
HTML::HTMLHtmlElement* Document::html_element()
|
||||
{
|
||||
auto* html = document_element();
|
||||
if (is<HTML::HTMLHtmlElement>(html))
|
||||
|
@ -192,7 +192,7 @@ const HTML::HTMLHtmlElement* Document::html_element() const
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
const HTML::HTMLHeadElement* Document::head() const
|
||||
HTML::HTMLHeadElement* Document::head()
|
||||
{
|
||||
auto* html = html_element();
|
||||
if (!html)
|
||||
|
@ -200,7 +200,7 @@ const HTML::HTMLHeadElement* Document::head() const
|
|||
return html->first_child_of_type<HTML::HTMLHeadElement>();
|
||||
}
|
||||
|
||||
const HTML::HTMLElement* Document::body() const
|
||||
HTML::HTMLElement* Document::body()
|
||||
{
|
||||
auto* html = html_element();
|
||||
if (!html)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue