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
commit e8e9426b4f
Notes: sideshowbarker 2024-07-18 08:53:06 +09:00
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());