From 52fccae654f7e556a3f6a3f9e8ebe3f4ff4151ee Mon Sep 17 00:00:00 2001 From: Shannon Booth Date: Thu, 21 Sep 2023 20:14:57 +1200 Subject: [PATCH] LibWeb: Make Element::set_inner_html take a StringView It delegates to DOMParsing::inner_html_setter, which already takes a StringView. --- Userland/Libraries/LibWeb/DOM/Element.cpp | 2 +- Userland/Libraries/LibWeb/DOM/Element.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibWeb/DOM/Element.cpp b/Userland/Libraries/LibWeb/DOM/Element.cpp index 0c0b68dadf..465189e205 100644 --- a/Userland/Libraries/LibWeb/DOM/Element.cpp +++ b/Userland/Libraries/LibWeb/DOM/Element.cpp @@ -715,7 +715,7 @@ WebIDL::ExceptionOr Element::closest(StringView selectors) return nullptr; } -WebIDL::ExceptionOr Element::set_inner_html(DeprecatedString const& markup) +WebIDL::ExceptionOr Element::set_inner_html(StringView markup) { TRY(DOMParsing::inner_html_setter(*this, markup)); return {}; diff --git a/Userland/Libraries/LibWeb/DOM/Element.h b/Userland/Libraries/LibWeb/DOM/Element.h index 3d8bfaef62..67683400ea 100644 --- a/Userland/Libraries/LibWeb/DOM/Element.h +++ b/Userland/Libraries/LibWeb/DOM/Element.h @@ -188,7 +188,7 @@ public: CSS::CSSStyleDeclaration* style_for_bindings(); WebIDL::ExceptionOr inner_html() const; - WebIDL::ExceptionOr set_inner_html(DeprecatedString const&); + WebIDL::ExceptionOr set_inner_html(StringView); WebIDL::ExceptionOr insert_adjacent_html(DeprecatedString position, DeprecatedString text);