mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:42:44 +00:00 
			
		
		
		
	LibWeb: Add HTMLToken::make_character()
It's tedious to make character tokens manually all the time.
This commit is contained in:
		
							parent
							
								
									42243d2e06
								
							
						
					
					
						commit
						4788bcd6f8
					
				
					 1 changed files with 8 additions and 0 deletions
				
			
		|  | @ -49,6 +49,14 @@ public: | |||
|         EndOfFile, | ||||
|     }; | ||||
| 
 | ||||
|     static HTMLToken make_character(u32 codepoint) | ||||
|     { | ||||
|         HTMLToken token; | ||||
|         token.m_type = Type::Character; | ||||
|         token.m_comment_or_character.data.append(codepoint); | ||||
|         return token; | ||||
|     } | ||||
| 
 | ||||
|     bool is_doctype() const { return m_type == Type::DOCTYPE; } | ||||
|     bool is_start_tag() const { return m_type == Type::StartTag; } | ||||
|     bool is_end_tag() const { return m_type == Type::EndTag; } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling