1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 21:18:14 +00:00

LibWeb: Remove unecessary dependence on Window from HTML classes

These classes only needed Window to get at its realm. Pass a realm
directly to construct HTML classes.
This commit is contained in:
Andrew Kaster 2022-09-25 16:38:21 -06:00 committed by Linus Groh
parent a2ccb00e1d
commit f0c5f77f99
122 changed files with 334 additions and 317 deletions

View file

@ -24,10 +24,8 @@ class ErrorEvent final : public DOM::Event {
WEB_PLATFORM_OBJECT(ErrorEvent, DOM::Event);
public:
static ErrorEvent* create(HTML::Window&, FlyString const& event_name, ErrorEventInit const& event_init = {});
static ErrorEvent* create_with_global_object(HTML::Window&, FlyString const& event_name, ErrorEventInit const& event_init);
ErrorEvent(HTML::Window&, FlyString const& event_name, ErrorEventInit const& event_init);
static ErrorEvent* create(JS::Realm&, FlyString const& event_name, ErrorEventInit const& event_init = {});
static ErrorEvent* construct_impl(JS::Realm&, FlyString const& event_name, ErrorEventInit const& event_init);
virtual ~ErrorEvent() override;
@ -47,6 +45,8 @@ public:
JS::Value error() const { return m_error; }
private:
ErrorEvent(JS::Realm&, FlyString const& event_name, ErrorEventInit const& event_init);
virtual void visit_edges(Cell::Visitor&) override;
String m_message { "" };