summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb/HTML/HTMLAnchorElement.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-07-26 17:16:18 +0200
committerAndreas Kling <kling@serenityos.org>2020-07-26 17:51:00 +0200
commit71556e39a461e045015fa28a984c1649c9d15b83 (patch)
tree26669f0d6ab67b859680930df2ccca9875fe9f69 /Libraries/LibWeb/HTML/HTMLAnchorElement.h
parentfe6474e69273a033a22f7961228b75a9eb967ab7 (diff)
downloadserenity-71556e39a461e045015fa28a984c1649c9d15b83.zip
LibWeb: Switch to using AK::is and AK::downcast
Diffstat (limited to 'Libraries/LibWeb/HTML/HTMLAnchorElement.h')
-rw-r--r--Libraries/LibWeb/HTML/HTMLAnchorElement.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/Libraries/LibWeb/HTML/HTMLAnchorElement.h b/Libraries/LibWeb/HTML/HTMLAnchorElement.h
index a7973040a1..66432a8e5d 100644
--- a/Libraries/LibWeb/HTML/HTMLAnchorElement.h
+++ b/Libraries/LibWeb/HTML/HTMLAnchorElement.h
@@ -39,10 +39,8 @@ public:
String target() const { return attribute(HTML::AttributeNames::target); }
};
-template<>
-inline bool is<HTMLAnchorElement>(const Node& node)
-{
- return is<Element>(node) && to<Element>(node).local_name() == HTML::TagNames::a;
}
-}
+AK_BEGIN_TYPE_TRAITS(Web::HTMLAnchorElement)
+static bool is_type(const Web::Node& node) { return node.is_element() && downcast<Web::Element>(node).local_name() == Web::HTML::TagNames::a; }
+AK_END_TYPE_TRAITS()