Browse Source

LibWeb: Port HTMLTitleElement from ByteString

Shannon Booth 1 year ago
parent
commit
adb327d5d3

+ 2 - 2
Userland/Libraries/LibWeb/HTML/HTMLTitleElement.cpp

@@ -35,10 +35,10 @@ void HTMLTitleElement::children_changed()
 }
 
 // https://html.spec.whatwg.org/multipage/semantics.html#dom-title-text
-ByteString HTMLTitleElement::text()
+String HTMLTitleElement::text() const
 {
     // The text attribute's getter must return this title element's child text content.
-    return child_text_content().to_byte_string();
+    return child_text_content();
 }
 
 // https://html.spec.whatwg.org/multipage/semantics.html#dom-title-text

+ 1 - 1
Userland/Libraries/LibWeb/HTML/HTMLTitleElement.h

@@ -17,7 +17,7 @@ class HTMLTitleElement final : public HTMLElement {
 public:
     virtual ~HTMLTitleElement() override;
 
-    ByteString text();
+    String text() const;
     void set_text(String const& value);
 
 private: