diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp index 242662e5ee..703b90672a 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.cpp +++ b/Userland/Libraries/LibWeb/DOM/Document.cpp @@ -1189,10 +1189,10 @@ JS::NonnullGCPtr Document::get_elements_by_name(DeprecatedString }); } -JS::NonnullGCPtr Document::get_elements_by_class_name(DeprecatedFlyString const& class_names) +JS::NonnullGCPtr Document::get_elements_by_class_name(StringView class_names) { Vector list_of_class_names; - for (auto& name : class_names.view().split_view(' ')) { + for (auto& name : class_names.split_view(' ')) { 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/Document.h b/Userland/Libraries/LibWeb/DOM/Document.h index e636661ea2..309ee6ea7b 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.h +++ b/Userland/Libraries/LibWeb/DOM/Document.h @@ -217,7 +217,7 @@ public: void schedule_layout_update(); JS::NonnullGCPtr get_elements_by_name(DeprecatedString const&); - JS::NonnullGCPtr get_elements_by_class_name(DeprecatedFlyString const&); + JS::NonnullGCPtr get_elements_by_class_name(StringView); JS::NonnullGCPtr applets(); JS::NonnullGCPtr anchors();