mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-31 21:30:58 +00:00 
			
		
		
		
	LibWeb: Implement <template> parsing
Note that there is currently no way to display them as we can't currently clone nodes. Adds special case for templates for dumping to console. Doesn't add it to the DOM inspector as I'm not sure how to do it.
This commit is contained in:
		
							parent
							
								
									f48feae0b2
								
							
						
					
					
						commit
						7902d215b3
					
				
				
				Notes:
				
					sideshowbarker
				
				2024-07-19 03:23:09 +09:00 
				
			
			Author: https://github.com/Lubrsi
Commit: 7902d215b3
Pull-request: https://github.com/SerenityOS/serenity/pull/3224
Reviewed-by: https://github.com/awesomekling
			
					 14 changed files with 174 additions and 28 deletions
				
			
		|  | @ -133,14 +133,14 @@ DOM::Element* StackOfOpenElements::topmost_special_node_below(const DOM::Element | |||
|     return found_element; | ||||
| } | ||||
| 
 | ||||
| DOM::Element* StackOfOpenElements::last_element_with_tag_name(const FlyString& tag_name) | ||||
| StackOfOpenElements::LastElementResult StackOfOpenElements::last_element_with_tag_name(const FlyString& tag_name) | ||||
| { | ||||
|     for (ssize_t i = m_elements.size() - 1; i >= 0; --i) { | ||||
|         auto& element = m_elements[i]; | ||||
|         if (element.local_name() == tag_name) | ||||
|             return &element; | ||||
|             return { &element, i }; | ||||
|     } | ||||
|     return nullptr; | ||||
|     return { nullptr, -1 }; | ||||
| } | ||||
| 
 | ||||
| DOM::Element* StackOfOpenElements::element_before(const DOM::Element& target) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Luke
						Luke