/* * Copyright (c) 2020, the SerenityOS developers. * Copyright (c) 2021, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include namespace Web::HTML { class HTMLAreaElement final : public HTMLElement , public HTMLHyperlinkElementUtils { WEB_PLATFORM_OBJECT(HTMLAreaElement, HTMLElement); GC_DECLARE_ALLOCATOR(HTMLAreaElement); public: virtual ~HTMLAreaElement() override; GC::Ref rel_list(); private: HTMLAreaElement(DOM::Document&, DOM::QualifiedName); virtual bool is_html_area_element() const override { return true; } virtual void initialize(JS::Realm&) override; virtual void visit_edges(Cell::Visitor&) override; virtual Optional extract_an_origin() const final { return hyperlink_element_utils_extract_an_origin(); } // ^DOM::Element virtual void attribute_changed(FlyString const& name, Optional const& old_value, Optional const& value, Optional const& namespace_) override; virtual i32 default_tab_index_value() const override; // ^HTML::HTMLHyperlinkElementUtils virtual DOM::Element& hyperlink_element_utils_element() override { return *this; } virtual DOM::Element const& hyperlink_element_utils_element() const override { return *this; } virtual Optional default_role() const override; GC::Ptr m_rel_list; }; } namespace Web::DOM { template<> inline bool Node::fast_is() const { return is_html_area_element(); } }