2021-04-06 17:06:23 +01:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2021, the SerenityOS developers.
|
|
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2021-04-06 17:06:23 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <AK/FlyString.h>
|
|
|
|
|
#include <LibWeb/DOM/CharacterData.h>
|
|
|
|
|
|
|
|
|
|
namespace Web::DOM {
|
|
|
|
|
|
|
|
|
|
class ProcessingInstruction final : public CharacterData {
|
|
|
|
|
public:
|
|
|
|
|
using WrapperType = Bindings::ProcessingInstructionWrapper;
|
|
|
|
|
|
2022-04-01 20:58:27 +03:00
|
|
|
ProcessingInstruction(Document&, String const& data, String const& target);
|
2022-03-14 13:21:51 -06:00
|
|
|
virtual ~ProcessingInstruction() override = default;
|
2021-04-06 17:06:23 +01:00
|
|
|
|
|
|
|
|
virtual FlyString node_name() const override { return m_target; }
|
|
|
|
|
|
2022-04-01 20:58:27 +03:00
|
|
|
String const& target() const { return m_target; }
|
2021-04-06 17:06:23 +01:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
String m_target;
|
|
|
|
|
};
|
|
|
|
|
|
2022-03-29 23:28:17 +02:00
|
|
|
template<>
|
|
|
|
|
inline bool Node::fast_is<ProcessingInstruction>() const { return node_type() == (u16)NodeType::PROCESSING_INSTRUCTION_NODE; }
|
|
|
|
|
|
2021-04-06 17:06:23 +01:00
|
|
|
}
|