mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 03:22:43 +00:00 
			
		
		
		
	 3bee9d3d3c
			
		
	
	
		3bee9d3d3c
		
	
	
	
	
		
			
			This is a lot nicer than first_child_with_tag_name(...). The is<T>(Node) functions are obviously unoptimized at the moment, and this is about establishing pleasant patterns right now. :^)
		
			
				
	
	
		
			15 lines
		
	
	
	
		
			358 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
	
		
			358 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #pragma once
 | |
| 
 | |
| #include <LibHTML/DOM/HTMLElement.h>
 | |
| 
 | |
| class HTMLHeadElement : public HTMLElement {
 | |
| public:
 | |
|     HTMLHeadElement(Document&, const String& tag_name);
 | |
|     virtual ~HTMLHeadElement() override;
 | |
| };
 | |
| 
 | |
| template<>
 | |
| inline bool is<HTMLHeadElement>(const Node& node)
 | |
| {
 | |
|     return is<Element>(node) && to<Element>(node).tag_name().to_lowercase() == "head";
 | |
| }
 |