diff options
author | Max Wipfli <mail@maxwipfli.ch> | 2021-07-14 23:32:18 +0200 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2021-07-17 16:24:57 +0430 |
commit | e8e9426b4fcf6042b7658a805eabe9b2012d6769 (patch) | |
tree | 949d63733e90bc553cdbc8d3f24241704725a287 /Userland/Libraries/LibWeb/HTML/Parser/HTMLToken.h | |
parent | f886aa15b8665e0bb0e886506aa492c99347f1f7 (diff) | |
download | serenity-e8e9426b4fcf6042b7658a805eabe9b2012d6769.zip |
LibWeb: User getter and setter for Comment type HTMLTokens
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/Parser/HTMLToken.h')
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/Parser/HTMLToken.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLToken.h b/Userland/Libraries/LibWeb/HTML/Parser/HTMLToken.h index 568bf25035..74cf4bb359 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLToken.h +++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLToken.h @@ -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()); |