summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/DOM/Comment.h
blob: 9f4c37ef3d65ab7f21d860d3d3c37fedf2798d1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
 * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#pragma once

#include <AK/FlyString.h>
#include <LibWeb/DOM/CharacterData.h>

namespace Web::DOM {

class Comment final : public CharacterData {
    WEB_PLATFORM_OBJECT(Comment, CharacterData);

public:
    static JS::NonnullGCPtr<Comment> create_with_global_object(HTML::Window&, String const& data);
    virtual ~Comment() override = default;

    virtual FlyString node_name() const override { return "#comment"; }

private:
    explicit Comment(Document&, String const&);
};

template<>
inline bool Node::fast_is<Comment>() const { return is_comment(); }

}

WRAPPER_HACK(Comment, Web::DOM)