2020-01-18 11:38:21 +03:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
*
|
2021-04-22 11:24:48 +03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 11:38:21 +03:00
|
|
|
*/
|
|
|
|
|
2019-10-13 00:26:47 +03:00
|
|
|
#pragma once
|
|
|
|
|
2020-03-22 21:10:43 +03:00
|
|
|
#include <AK/FlyString.h>
|
2020-03-07 12:32:51 +03:00
|
|
|
#include <LibWeb/DOM/CharacterData.h>
|
2019-10-13 00:26:47 +03:00
|
|
|
|
2020-07-26 20:37:56 +03:00
|
|
|
namespace Web::DOM {
|
2020-03-07 12:27:02 +03:00
|
|
|
|
2019-10-13 00:26:47 +03:00
|
|
|
class Comment final : public CharacterData {
|
2022-08-28 14:42:07 +03:00
|
|
|
WEB_PLATFORM_OBJECT(Comment, CharacterData);
|
2020-08-17 21:14:30 +03:00
|
|
|
|
2022-08-28 14:42:07 +03:00
|
|
|
public:
|
2022-09-26 01:15:49 +03:00
|
|
|
static JS::NonnullGCPtr<Comment> construct_impl(JS::Realm&, String const& data);
|
2022-03-14 22:21:51 +03:00
|
|
|
virtual ~Comment() override = default;
|
2019-10-13 00:26:47 +03:00
|
|
|
|
2020-06-16 20:09:14 +03:00
|
|
|
virtual FlyString node_name() const override { return "#comment"; }
|
2021-09-06 03:07:11 +03:00
|
|
|
|
2022-08-28 14:42:07 +03:00
|
|
|
private:
|
2022-09-26 01:15:49 +03:00
|
|
|
Comment(Document&, String const&);
|
2019-10-13 00:26:47 +03:00
|
|
|
};
|
|
|
|
|
2022-03-30 00:28:17 +03:00
|
|
|
template<>
|
|
|
|
inline bool Node::fast_is<Comment>() const { return is_comment(); }
|
|
|
|
|
2019-10-13 00:26:47 +03:00
|
|
|
}
|