1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 03:58:12 +00:00

LibWeb: Port ShadowRoot interface from DeprecatedString to String

This commit is contained in:
Shannon Booth 2023-09-06 14:52:53 +12:00 committed by Tim Flynn
parent 0ce5a920f7
commit 6789a2dd8e
5 changed files with 5 additions and 5 deletions

View file

@ -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));

View file

@ -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);

View file

@ -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;

View file

@ -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)

View file

@ -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);