Browse Source

LibWeb: Add is<HTMLImageElement>()

Andreas Kling 5 years ago
parent
commit
22de1e47ec
1 changed files with 6 additions and 0 deletions
  1. 6 0
      Libraries/LibWeb/DOM/HTMLImageElement.h

+ 6 - 0
Libraries/LibWeb/DOM/HTMLImageElement.h

@@ -60,4 +60,10 @@ private:
     ByteBuffer m_encoded_data;
     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");
+}
+
 }
 }