1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 03:47:34 +00:00

LibWeb: Make sure that head and body always get the HTML element

Now that document element returns a generic DOM element, we need to
make sure head and body get a html element. 

The spec just says to check if the document element is a html element,
so let's do that.
This commit is contained in:
Luke 2020-08-03 21:23:40 +01:00 committed by Andreas Kling
parent 0622b60fbd
commit 567845c480
2 changed files with 11 additions and 2 deletions

View file

@ -86,6 +86,7 @@ public:
const Node* inspected_node() const { return m_inspected_node; }
const Element* document_element() const;
const HTML::HTMLHtmlElement* html_element() const;
const HTML::HTMLHeadElement* head() const;
const HTML::HTMLElement* body() const;