diff --git a/Userland/Libraries/LibWeb/HTML/DOMParser.cpp b/Userland/Libraries/LibWeb/HTML/DOMParser.cpp
index 9d44da20e7..0ef54dd61c 100644
--- a/Userland/Libraries/LibWeb/HTML/DOMParser.cpp
+++ b/Userland/Libraries/LibWeb/HTML/DOMParser.cpp
@@ -33,7 +33,7 @@ void DOMParser::initialize(JS::Realm& realm)
}
// https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring
-JS::NonnullGCPtr DOMParser::parse_from_string(DeprecatedString const& string, Bindings::DOMParserSupportedType type)
+JS::NonnullGCPtr DOMParser::parse_from_string(StringView string, Bindings::DOMParserSupportedType type)
{
// 1. Let document be a new Document, whose content type is type and url is this's relevant global object's associated Document's URL.
JS::GCPtr document;
@@ -43,7 +43,7 @@ JS::NonnullGCPtr DOMParser::parse_from_string(DeprecatedString co
// -> "text/html"
// 1. Set document's type to "html".
document = HTML::HTMLDocument::create(realm(), verify_cast(relevant_global_object(*this)).associated_document().url());
- document->set_content_type(Bindings::idl_enum_to_deprecated_string(type));
+ document->set_content_type(Bindings::idl_enum_to_string(type).to_deprecated_string());
document->set_document_type(DOM::Document::Type::HTML);
// 2. Create an HTML parser parser, associated with document.
@@ -57,7 +57,7 @@ JS::NonnullGCPtr DOMParser::parse_from_string(DeprecatedString co
} else {
// -> Otherwise
document = DOM::Document::create(realm(), verify_cast(relevant_global_object(*this)).associated_document().url());
- document->set_content_type(Bindings::idl_enum_to_deprecated_string(type));
+ document->set_content_type(Bindings::idl_enum_to_string(type).to_deprecated_string());
// 1. Create an XML parser parse, associated with document, and with XML scripting support disabled.
XML::Parser parser(string, { .resolve_external_resource = resolve_xml_resource });
diff --git a/Userland/Libraries/LibWeb/HTML/DOMParser.h b/Userland/Libraries/LibWeb/HTML/DOMParser.h
index 85f696e46b..ca0775d7bb 100644
--- a/Userland/Libraries/LibWeb/HTML/DOMParser.h
+++ b/Userland/Libraries/LibWeb/HTML/DOMParser.h
@@ -23,7 +23,7 @@ public:
virtual ~DOMParser() override;
- JS::NonnullGCPtr parse_from_string(DeprecatedString const&, Bindings::DOMParserSupportedType type);
+ JS::NonnullGCPtr parse_from_string(StringView, Bindings::DOMParserSupportedType type);
private:
explicit DOMParser(JS::Realm&);
diff --git a/Userland/Libraries/LibWeb/HTML/DOMParser.idl b/Userland/Libraries/LibWeb/HTML/DOMParser.idl
index 964d89ffb4..bfe112d109 100644
--- a/Userland/Libraries/LibWeb/HTML/DOMParser.idl
+++ b/Userland/Libraries/LibWeb/HTML/DOMParser.idl
@@ -9,7 +9,7 @@ enum DOMParserSupportedType {
};
// https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#domparser
-[Exposed=Window, UseDeprecatedAKString]
+[Exposed=Window]
interface DOMParser {
constructor();