2020-08-01 03:04:26 +01:00
|
|
|
/*
|
2021-04-28 22:46:44 +02:00
|
|
|
* Copyright (c) 2020, the SerenityOS developers.
|
2021-10-03 19:39:12 +02:00
|
|
|
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
|
2020-08-01 03:04:26 +01:00
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-08-01 03:04:26 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <LibWeb/HTML/HTMLElement.h>
|
2021-10-03 19:39:12 +02:00
|
|
|
#include <LibWeb/HTML/HTMLHyperlinkElementUtils.h>
|
2020-08-01 03:04:26 +01:00
|
|
|
|
|
|
|
namespace Web::HTML {
|
|
|
|
|
2021-10-03 19:39:12 +02:00
|
|
|
class HTMLAreaElement final
|
|
|
|
: public HTMLElement
|
|
|
|
, public HTMLHyperlinkElementUtils {
|
2022-08-28 13:42:07 +02:00
|
|
|
WEB_PLATFORM_OBJECT(HTMLAreaElement, HTMLElement);
|
2020-08-01 03:04:26 +01:00
|
|
|
|
2022-08-28 13:42:07 +02:00
|
|
|
public:
|
2020-08-01 03:04:26 +01:00
|
|
|
virtual ~HTMLAreaElement() override;
|
2021-10-03 19:39:12 +02:00
|
|
|
|
|
|
|
private:
|
2022-08-28 13:42:07 +02:00
|
|
|
HTMLAreaElement(DOM::Document&, DOM::QualifiedName);
|
|
|
|
|
2023-01-28 12:33:35 -05:00
|
|
|
virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
|
2023-01-10 06:28:20 -05:00
|
|
|
|
2021-10-03 19:39:12 +02:00
|
|
|
// ^DOM::Element
|
2023-01-08 19:23:00 -05:00
|
|
|
virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override;
|
2022-11-05 03:58:14 +00:00
|
|
|
virtual i32 default_tab_index_value() const override;
|
2021-10-03 19:39:12 +02:00
|
|
|
|
|
|
|
// ^HTML::HTMLHyperlinkElementUtils
|
2022-03-15 14:37:58 +00:00
|
|
|
virtual DOM::Document& hyperlink_element_utils_document() override { return document(); }
|
2022-12-04 18:02:33 +00:00
|
|
|
virtual DeprecatedString hyperlink_element_utils_href() const override;
|
|
|
|
virtual void set_hyperlink_element_utils_href(DeprecatedString) override;
|
2022-03-15 14:37:58 +00:00
|
|
|
virtual bool hyperlink_element_utils_is_html_anchor_element() const override { return false; }
|
|
|
|
virtual bool hyperlink_element_utils_is_connected() const override { return is_connected(); }
|
2022-12-04 18:02:33 +00:00
|
|
|
virtual DeprecatedString hyperlink_element_utils_target() const override { return ""; }
|
2022-12-15 14:35:49 +00:00
|
|
|
virtual DeprecatedString hyperlink_element_utils_rel() const override { return ""; }
|
2022-03-15 14:37:58 +00:00
|
|
|
virtual void hyperlink_element_utils_queue_an_element_task(HTML::Task::Source source, Function<void()> steps) override
|
|
|
|
{
|
|
|
|
queue_an_element_task(source, move(steps));
|
|
|
|
}
|
2022-11-28 17:58:13 -06:00
|
|
|
|
2023-01-28 22:23:16 +00:00
|
|
|
virtual Optional<ARIA::Role> default_role() const override;
|
2020-08-01 03:04:26 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|