summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-04-14 20:35:49 +0200
committerAndreas Kling <kling@serenityos.org>2020-04-14 20:35:49 +0200
commit22de1e47ec9092da84b9da9ea0372988898a4eb2 (patch)
tree2b69cb8f9500cc70f805bf08845f3200477cc10e /Libraries/LibWeb
parent1813e083ff468a6b11bdd1d9b993845d7321deed (diff)
downloadserenity-22de1e47ec9092da84b9da9ea0372988898a4eb2.zip
LibWeb: Add is<HTMLImageElement>()
Diffstat (limited to 'Libraries/LibWeb')
-rw-r--r--Libraries/LibWeb/DOM/HTMLImageElement.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Libraries/LibWeb/DOM/HTMLImageElement.h b/Libraries/LibWeb/DOM/HTMLImageElement.h
index ab653a8f09..46056f9d93 100644
--- a/Libraries/LibWeb/DOM/HTMLImageElement.h
+++ b/Libraries/LibWeb/DOM/HTMLImageElement.h
@@ -60,4 +60,10 @@ private:
ByteBuffer m_encoded_data;
};
+template<>
+inline bool is<HTMLImageElement>(const Node& node)
+{
+ return is<Element>(node) && to<Element>(node).tag_name().equals_ignoring_case("img");
+}
+
}