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