2020-07-31 23:04:26 -03:00
|
|
|
/*
|
2021-04-28 17:46:44 -03:00
|
|
|
* Copyright (c) 2020, the SerenityOS developers.
|
2020-07-31 23:04:26 -03:00
|
|
|
*
|
2021-04-22 05:24:48 -03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-07-31 23:04:26 -03:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <LibWeb/HTML/HTMLAreaElement.h>
|
|
|
|
|
|
|
|
|
|
namespace Web::HTML {
|
|
|
|
|
|
2022-02-18 17:00:52 -03:00
|
|
|
HTMLAreaElement::HTMLAreaElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
2021-02-07 07:20:15 -03:00
|
|
|
: HTMLElement(document, move(qualified_name))
|
2020-07-31 23:04:26 -03:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-14 16:21:51 -03:00
|
|
|
HTMLAreaElement::~HTMLAreaElement() = default;
|
2020-07-31 23:04:26 -03:00
|
|
|
|
2021-10-03 14:39:12 -03:00
|
|
|
void HTMLAreaElement::parse_attribute(FlyString const& name, String const& value)
|
|
|
|
|
{
|
|
|
|
|
HTMLElement::parse_attribute(name, value);
|
|
|
|
|
if (name == HTML::AttributeNames::href) {
|
|
|
|
|
set_the_url();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String HTMLAreaElement::hyperlink_element_utils_href() const
|
|
|
|
|
{
|
|
|
|
|
return attribute(HTML::AttributeNames::href);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void HTMLAreaElement::set_hyperlink_element_utils_href(String href)
|
|
|
|
|
{
|
|
|
|
|
set_attribute(HTML::AttributeNames::href, move(href));
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-31 23:04:26 -03:00
|
|
|
}
|