ProcessingInstruction.cpp 607 B

123456789101112131415161718192021
  1. /*
  2. * Copyright (c) 2021, the SerenityOS developers.
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibWeb/Bindings/Intrinsics.h>
  7. #include <LibWeb/DOM/Document.h>
  8. #include <LibWeb/DOM/ProcessingInstruction.h>
  9. #include <LibWeb/Layout/TextNode.h>
  10. namespace Web::DOM {
  11. ProcessingInstruction::ProcessingInstruction(Document& document, DeprecatedString const& data, DeprecatedString const& target)
  12. : CharacterData(document, NodeType::PROCESSING_INSTRUCTION_NODE, data)
  13. , m_target(target)
  14. {
  15. set_prototype(&Bindings::cached_web_prototype(document.realm(), "ProcessingInstruction"));
  16. }
  17. }