summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/ErrorEvent.h
diff options
context:
space:
mode:
authorKenneth Myhra <kennethmyhra@gmail.com>2023-03-05 10:17:53 +0100
committerLinus Groh <mail@linusgroh.de>2023-03-05 18:25:59 +0000
commit84997ab0eecc9ee9926b0b05007f525bfd9cba6f (patch)
treedbd9d645e11e5acb840854e8a22c7a8dba7bc953 /Userland/Libraries/LibWeb/HTML/ErrorEvent.h
parente661f03ffae146f70ba3c81ffe8cc2f2c50dd1ba (diff)
downloadserenity-84997ab0eecc9ee9926b0b05007f525bfd9cba6f.zip
LibWeb: Port ErrorEvent to new String
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/ErrorEvent.h')
-rw-r--r--Userland/Libraries/LibWeb/HTML/ErrorEvent.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/ErrorEvent.h b/Userland/Libraries/LibWeb/HTML/ErrorEvent.h
index 7af56154f3..e67b6cdf92 100644
--- a/Userland/Libraries/LibWeb/HTML/ErrorEvent.h
+++ b/Userland/Libraries/LibWeb/HTML/ErrorEvent.h
@@ -6,14 +6,15 @@
#pragma once
+#include <AK/FlyString.h>
#include <LibWeb/DOM/Event.h>
namespace Web::HTML {
// https://html.spec.whatwg.org/multipage/webappapis.html#erroreventinit
struct ErrorEventInit : public DOM::EventInit {
- DeprecatedString message { "" };
- DeprecatedString filename { "" }; // FIXME: This should be a USVString.
+ String message;
+ String filename; // FIXME: This should be a USVString.
u32 lineno { 0 };
u32 colno { 0 };
JS::Value error { JS::js_null() };
@@ -24,16 +25,16 @@ class ErrorEvent final : public DOM::Event {
WEB_PLATFORM_OBJECT(ErrorEvent, DOM::Event);
public:
- static WebIDL::ExceptionOr<JS::NonnullGCPtr<ErrorEvent>> create(JS::Realm&, DeprecatedFlyString const& event_name, ErrorEventInit const& event_init = {});
- static WebIDL::ExceptionOr<JS::NonnullGCPtr<ErrorEvent>> construct_impl(JS::Realm&, DeprecatedFlyString const& event_name, ErrorEventInit const& event_init);
+ static WebIDL::ExceptionOr<JS::NonnullGCPtr<ErrorEvent>> create(JS::Realm&, FlyString const& event_name, ErrorEventInit const& event_init = {});
+ static WebIDL::ExceptionOr<JS::NonnullGCPtr<ErrorEvent>> construct_impl(JS::Realm&, FlyString const& event_name, ErrorEventInit const& event_init);
virtual ~ErrorEvent() override;
// https://html.spec.whatwg.org/multipage/webappapis.html#dom-errorevent-message
- DeprecatedString const& message() const { return m_message; }
+ String const& message() const { return m_message; }
// https://html.spec.whatwg.org/multipage/webappapis.html#dom-errorevent-filename
- DeprecatedString const& filename() const { return m_filename; }
+ String const& filename() const { return m_filename; }
// https://html.spec.whatwg.org/multipage/webappapis.html#dom-errorevent-lineno
u32 lineno() const { return m_lineno; }
@@ -45,13 +46,13 @@ public:
JS::Value error() const { return m_error; }
private:
- ErrorEvent(JS::Realm&, DeprecatedFlyString const& event_name, ErrorEventInit const& event_init);
+ ErrorEvent(JS::Realm&, FlyString const& event_name, ErrorEventInit const& event_init);
virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
virtual void visit_edges(Cell::Visitor&) override;
- DeprecatedString m_message { "" };
- DeprecatedString m_filename { "" }; // FIXME: This should be a USVString.
+ String m_message;
+ String m_filename; // FIXME: This should be a USVString.
u32 m_lineno { 0 };
u32 m_colno { 0 };
JS::Value m_error;