/* * Copyright (c) 2021, Tim Flynn * * SPDX-License-Identifier: BSD-2-Clause */ #include #include #include namespace Web::DOM { NonnullRefPtr Attribute::create(Document& document, FlyString local_name, String value, Element const* owner_element) { return adopt_ref(*new Attribute(document, move(local_name), move(value), owner_element)); } Attribute::Attribute(Document& document, FlyString local_name, String value, Element const* owner_element) : Node(document, NodeType::ATTRIBUTE_NODE) , m_qualified_name(move(local_name), {}, {}) , m_value(move(value)) , m_owner_element(owner_element) { } Element const* Attribute::owner_element() const { return m_owner_element; } void Attribute::set_owner_element(Element const* owner_element) { m_owner_element = owner_element; } }