1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:48:11 +00:00

LibWeb: User getter and setter for Comment type HTMLTokens

This commit is contained in:
Max Wipfli 2021-07-14 23:32:18 +02:00 committed by Ali Mohammad Pur
parent f886aa15b8
commit e8e9426b4f
3 changed files with 25 additions and 15 deletions

View file

@ -97,6 +97,18 @@ public:
}
}
String const& comment() const
{
VERIFY(is_comment());
return m_comment_or_character.data;
}
void set_comment(String comment)
{
VERIFY(is_comment());
m_comment_or_character.data = move(comment);
}
String tag_name() const
{
VERIFY(is_start_tag() || is_end_tag());