summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb/DOM/Document.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-05-10 20:43:54 +0200
committerAndreas Kling <kling@serenityos.org>2020-05-10 22:32:12 +0200
commit0e60e7aef0303263fe9b757e7454f93425884c75 (patch)
tree0c035c149f21f9b1f8c0225e4743385ffa53d4dd /Libraries/LibWeb/DOM/Document.h
parent9d7ab13b3208b642c179d29632b748fb77ecd0c0 (diff)
downloadserenity-0e60e7aef0303263fe9b757e7454f93425884c75.zip
LibWeb: Add Document create_element() and create_text_node() helpers
Diffstat (limited to 'Libraries/LibWeb/DOM/Document.h')
-rw-r--r--Libraries/LibWeb/DOM/Document.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Libraries/LibWeb/DOM/Document.h b/Libraries/LibWeb/DOM/Document.h
index 66161a8742..601dbf7bd9 100644
--- a/Libraries/LibWeb/DOM/Document.h
+++ b/Libraries/LibWeb/DOM/Document.h
@@ -125,6 +125,9 @@ public:
JS::Value run_javascript(const StringView&);
+ NonnullRefPtr<Element> create_element(const String& tag_name);
+ NonnullRefPtr<Text> create_text_node(const String& data);
+
private:
virtual RefPtr<LayoutNode> create_layout_node(const StyleProperties* parent_style) const override;