1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:07:34 +00:00

LibWeb: Make Element::set_inner_html take a StringView

It delegates to DOMParsing::inner_html_setter, which already takes a
StringView.
This commit is contained in:
Shannon Booth 2023-09-21 20:14:57 +12:00 committed by Andreas Kling
parent dbd46f240b
commit 52fccae654
2 changed files with 2 additions and 2 deletions

View file

@ -715,7 +715,7 @@ WebIDL::ExceptionOr<DOM::Element const*> Element::closest(StringView selectors)
return nullptr; return nullptr;
} }
WebIDL::ExceptionOr<void> Element::set_inner_html(DeprecatedString const& markup) WebIDL::ExceptionOr<void> Element::set_inner_html(StringView markup)
{ {
TRY(DOMParsing::inner_html_setter(*this, markup)); TRY(DOMParsing::inner_html_setter(*this, markup));
return {}; return {};

View file

@ -188,7 +188,7 @@ public:
CSS::CSSStyleDeclaration* style_for_bindings(); CSS::CSSStyleDeclaration* style_for_bindings();
WebIDL::ExceptionOr<DeprecatedString> inner_html() const; WebIDL::ExceptionOr<DeprecatedString> inner_html() const;
WebIDL::ExceptionOr<void> set_inner_html(DeprecatedString const&); WebIDL::ExceptionOr<void> set_inner_html(StringView);
WebIDL::ExceptionOr<void> insert_adjacent_html(DeprecatedString position, DeprecatedString text); WebIDL::ExceptionOr<void> insert_adjacent_html(DeprecatedString position, DeprecatedString text);