summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp1
-rw-r--r--Libraries/LibWeb/DOM/Document.cpp2
-rw-r--r--Libraries/LibWeb/DOM/Document.h2
-rw-r--r--Libraries/LibWeb/DOM/Document.idl2
4 files changed, 5 insertions, 2 deletions
diff --git a/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp b/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp
index 7f4fc52665..043e2811c8 100644
--- a/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp
+++ b/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp
@@ -376,6 +376,7 @@ void generate_implementation(const IDL::Interface& interface)
out() << "#include <LibWeb/Bindings/NodeWrapperFactory.h>";
out() << "#include <LibWeb/Bindings/" << wrapper_class << ".h>";
out() << "#include <LibWeb/DOM/Element.h>";
+ out() << "#include <LibWeb/DOM/HTMLElement.h>";
out() << "namespace Web {";
out() << "namespace Bindings {";
diff --git a/Libraries/LibWeb/DOM/Document.cpp b/Libraries/LibWeb/DOM/Document.cpp
index 19083596f0..cacd240404 100644
--- a/Libraries/LibWeb/DOM/Document.cpp
+++ b/Libraries/LibWeb/DOM/Document.cpp
@@ -138,7 +138,7 @@ const HTMLHeadElement* Document::head() const
return html->first_child_of_type<HTMLHeadElement>();
}
-const HTMLBodyElement* Document::body() const
+const HTMLElement* Document::body() const
{
auto* html = document_element();
if (!html)
diff --git a/Libraries/LibWeb/DOM/Document.h b/Libraries/LibWeb/DOM/Document.h
index 5073b14ec3..0997643585 100644
--- a/Libraries/LibWeb/DOM/Document.h
+++ b/Libraries/LibWeb/DOM/Document.h
@@ -81,7 +81,7 @@ public:
const HTMLHtmlElement* document_element() const;
const HTMLHeadElement* head() const;
- const HTMLBodyElement* body() const;
+ const HTMLElement* body() const;
String title() const;
diff --git a/Libraries/LibWeb/DOM/Document.idl b/Libraries/LibWeb/DOM/Document.idl
index 2337154044..59f032b216 100644
--- a/Libraries/LibWeb/DOM/Document.idl
+++ b/Libraries/LibWeb/DOM/Document.idl
@@ -5,4 +5,6 @@ interface Document : Node {
ArrayFromVector querySelectorAll(DOMString selectors);
Element createElement(DOMString tagName);
+ readonly attribute HTMLElement? body;
+
}