diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp index 1fbd23eba0..242662e5ee 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.cpp +++ b/Userland/Libraries/LibWeb/DOM/Document.cpp @@ -464,7 +464,7 @@ WebIDL::ExceptionOr Document::run_the_document_write_steps(DeprecatedStrin } // https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-document-open -WebIDL::ExceptionOr Document::open(DeprecatedString const&, DeprecatedString const&) +WebIDL::ExceptionOr Document::open(StringView, StringView) { // 1. If document is an XML document, then throw an "InvalidStateError" DOMException exception. if (m_type == Type::XML) @@ -535,7 +535,7 @@ WebIDL::ExceptionOr Document::open(DeprecatedString const&, Deprecate } // https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-document-open-window -WebIDL::ExceptionOr> Document::open(DeprecatedString const& url, DeprecatedString const& name, DeprecatedString const& features) +WebIDL::ExceptionOr> Document::open(StringView url, StringView name, StringView features) { // 1. If this is not fully active, then throw an "InvalidAccessError" DOMException exception. if (!is_fully_active()) diff --git a/Userland/Libraries/LibWeb/DOM/Document.h b/Userland/Libraries/LibWeb/DOM/Document.h index 75fad76b84..986e1f1cb6 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.h +++ b/Userland/Libraries/LibWeb/DOM/Document.h @@ -319,8 +319,8 @@ public: WebIDL::ExceptionOr write(Vector const& strings); WebIDL::ExceptionOr writeln(Vector const& strings); - WebIDL::ExceptionOr open(DeprecatedString const& = "", DeprecatedString const& = ""); - WebIDL::ExceptionOr> open(DeprecatedString const& url, DeprecatedString const& name, DeprecatedString const& features); + WebIDL::ExceptionOr open(StringView = ""sv, StringView = ""sv); + WebIDL::ExceptionOr> open(StringView url, StringView name, StringView features); WebIDL::ExceptionOr close(); HTML::Window* default_view() { return m_window.ptr(); }