/* * Copyright (c) 2018-2020, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #include #include #include namespace Web::DOM { Text::Text(Document& document, const String& data) : CharacterData(document, NodeType::TEXT_NODE, data) { } Text::~Text() { } RefPtr Text::create_layout_node() { return adopt_ref(*new Layout::TextNode(document(), *this)); } // https://dom.spec.whatwg.org/#dom-text-text NonnullRefPtr Text::create_with_global_object(Bindings::WindowObject& window, String const& data) { return make_ref_counted(window.impl().document(), data); } }