浏览代码

LibWeb: Port ShadowRoot interface from DeprecatedString to String

Shannon Booth 1 年之前
父节点
当前提交
6789a2dd8e

+ 1 - 1
Userland/Libraries/LibWeb/DOM/ShadowRoot.cpp

@@ -44,7 +44,7 @@ WebIDL::ExceptionOr<DeprecatedString> ShadowRoot::inner_html() const
 }
 
 // https://w3c.github.io/DOM-Parsing/#dom-innerhtml-innerhtml
-WebIDL::ExceptionOr<void> ShadowRoot::set_inner_html(DeprecatedString const& markup)
+WebIDL::ExceptionOr<void> ShadowRoot::set_inner_html(StringView markup)
 {
     TRY(DOMParsing::inner_html_setter(*this, markup));
 

+ 1 - 1
Userland/Libraries/LibWeb/DOM/ShadowRoot.h

@@ -27,7 +27,7 @@ public:
     virtual EventTarget* get_parent(Event const&) override;
 
     WebIDL::ExceptionOr<DeprecatedString> inner_html() const;
-    WebIDL::ExceptionOr<void> set_inner_html(DeprecatedString const&);
+    WebIDL::ExceptionOr<void> set_inner_html(StringView);
 
 private:
     ShadowRoot(Document&, Element& host, Bindings::ShadowRootMode);

+ 1 - 1
Userland/Libraries/LibWeb/DOM/ShadowRoot.idl

@@ -2,7 +2,7 @@
 #import <DOM/InnerHTML.idl>
 
 // https://dom.spec.whatwg.org/#shadowroot
-[Exposed=Window, UseDeprecatedAKString]
+[Exposed=Window]
 interface ShadowRoot : DocumentFragment {
     readonly attribute ShadowRootMode mode;
     // FIXME: readonly attribute boolean delegatesFocus;

+ 1 - 1
Userland/Libraries/LibWeb/DOMParsing/InnerHTML.cpp

@@ -32,7 +32,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<DOM::DocumentFragment>> parse_fragment(Depr
 }
 
 // https://w3c.github.io/DOM-Parsing/#dom-innerhtml-innerhtml
-WebIDL::ExceptionOr<void> inner_html_setter(JS::NonnullGCPtr<DOM::Node> context_object, DeprecatedString const& value)
+WebIDL::ExceptionOr<void> inner_html_setter(JS::NonnullGCPtr<DOM::Node> context_object, StringView value)
 {
     // 1. Let context element be the context object's host if the context object is a ShadowRoot object, or the context object otherwise.
     //    (This is handled in Element and ShadowRoot)

+ 1 - 1
Userland/Libraries/LibWeb/DOMParsing/InnerHTML.h

@@ -14,7 +14,7 @@
 namespace Web::DOMParsing {
 
 // https://w3c.github.io/DOM-Parsing/#dom-innerhtml-innerhtml
-WebIDL::ExceptionOr<void> inner_html_setter(JS::NonnullGCPtr<DOM::Node> context_object, DeprecatedString const& value);
+WebIDL::ExceptionOr<void> inner_html_setter(JS::NonnullGCPtr<DOM::Node> context_object, StringView value);
 
 WebIDL::ExceptionOr<JS::NonnullGCPtr<DOM::DocumentFragment>> parse_fragment(DeprecatedString const& markup, DOM::Element& context_element);