diff --git a/Userland/Libraries/LibWeb/DOM/NonElementParentNode.h b/Userland/Libraries/LibWeb/DOM/NonElementParentNode.h index d0e3792bbd..f58e6dfc57 100644 --- a/Userland/Libraries/LibWeb/DOM/NonElementParentNode.h +++ b/Userland/Libraries/LibWeb/DOM/NonElementParentNode.h @@ -22,7 +22,7 @@ public: { JS::GCPtr found_element; static_cast(this)->template for_each_in_inclusive_subtree_of_type([&](auto& element) { - if (element.attribute(HTML::AttributeNames::id) == id) { + if (element.id() == id) { found_element = &element; return IterationDecision::Break; } @@ -35,7 +35,7 @@ public: { JS::GCPtr found_element; static_cast(this)->template for_each_in_inclusive_subtree_of_type([&](auto& element) { - if (element.attribute(HTML::AttributeNames::id) == id) { + if (element.id() == id) { found_element = &element; return IterationDecision::Break; }