2021-04-06 13:06:23 -03:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2021, the SerenityOS developers.
|
|
|
|
|
*
|
2021-04-22 05:24:48 -03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2021-04-06 13:06:23 -03:00
|
|
|
*/
|
|
|
|
|
|
2022-12-13 09:24:27 -03:00
|
|
|
#include <LibWeb/Bindings/Intrinsics.h>
|
2024-04-26 21:09:58 -03:00
|
|
|
#include <LibWeb/Bindings/ProcessingInstructionPrototype.h>
|
2022-12-13 09:24:27 -03:00
|
|
|
#include <LibWeb/DOM/Document.h>
|
2021-04-06 13:06:23 -03:00
|
|
|
#include <LibWeb/DOM/ProcessingInstruction.h>
|
|
|
|
|
#include <LibWeb/Layout/TextNode.h>
|
|
|
|
|
|
|
|
|
|
namespace Web::DOM {
|
|
|
|
|
|
2024-11-14 12:01:23 -03:00
|
|
|
GC_DEFINE_ALLOCATOR(ProcessingInstruction);
|
2023-11-19 15:47:52 -03:00
|
|
|
|
2025-07-24 13:05:52 -03:00
|
|
|
ProcessingInstruction::ProcessingInstruction(Document& document, Utf16String data, String const& target)
|
|
|
|
|
: CharacterData(document, NodeType::PROCESSING_INSTRUCTION_NODE, move(data))
|
2021-04-06 13:06:23 -03:00
|
|
|
, m_target(target)
|
|
|
|
|
{
|
2023-01-10 08:28:20 -03:00
|
|
|
}
|
|
|
|
|
|
2023-08-07 03:41:28 -03:00
|
|
|
void ProcessingInstruction::initialize(JS::Realm& realm)
|
2023-01-10 08:28:20 -03:00
|
|
|
{
|
2024-03-16 09:13:08 -03:00
|
|
|
WEB_SET_PROTOTYPE_FOR_INTERFACE(ProcessingInstruction);
|
2025-04-20 11:22:57 -03:00
|
|
|
Base::initialize(realm);
|
2021-04-06 13:06:23 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|