diff --git a/Userland/Libraries/LibWeb/DOM/Element.cpp b/Userland/Libraries/LibWeb/DOM/Element.cpp index aa23b36bb3..1a4cd39e07 100644 --- a/Userland/Libraries/LibWeb/DOM/Element.cpp +++ b/Userland/Libraries/LibWeb/DOM/Element.cpp @@ -748,10 +748,10 @@ bool Element::is_document_element() const return document().document_element() == this; } -JS::NonnullGCPtr Element::get_elements_by_class_name(DeprecatedFlyString const& class_names) +JS::NonnullGCPtr Element::get_elements_by_class_name(StringView class_names) { Vector list_of_class_names; - for (auto& name : class_names.view().split_view_if(Infra::is_ascii_whitespace)) { + for (auto& name : class_names.split_view_if(Infra::is_ascii_whitespace)) { list_of_class_names.append(FlyString::from_utf8(name).release_value_but_fixme_should_propagate_errors()); } return HTMLCollection::create(*this, HTMLCollection::Scope::Descendants, [list_of_class_names = move(list_of_class_names), quirks_mode = document().in_quirks_mode()](Element const& element) { diff --git a/Userland/Libraries/LibWeb/DOM/Element.h b/Userland/Libraries/LibWeb/DOM/Element.h index 0d0b68e386..090ef6b08e 100644 --- a/Userland/Libraries/LibWeb/DOM/Element.h +++ b/Userland/Libraries/LibWeb/DOM/Element.h @@ -199,7 +199,7 @@ public: bool is_target() const; bool is_document_element() const; - JS::NonnullGCPtr get_elements_by_class_name(DeprecatedFlyString const&); + JS::NonnullGCPtr get_elements_by_class_name(StringView); bool is_shadow_host() const; ShadowRoot* shadow_root_internal() { return m_shadow_root.ptr(); }