diff --git a/Userland/Libraries/LibWeb/DOM/EventTarget.cpp b/Userland/Libraries/LibWeb/DOM/EventTarget.cpp index aaf5548b7c..3a137644c5 100644 --- a/Userland/Libraries/LibWeb/DOM/EventTarget.cpp +++ b/Userland/Libraries/LibWeb/DOM/EventTarget.cpp @@ -56,9 +56,9 @@ void EventTarget::initialize(JS::Realm& realm) { Base::initialize(realm); - // FIXME: We can't do this for HTML::Window currently, as this will run when creating the initial global object. + // FIXME: We can't do this for HTML::Window or HTML::WorkerGlobalScope, as this will run when creating the initial global object. // During this time, the ESO is not setup, so it will cause a nullptr dereference in host_defined_intrinsics. - if (!is(this)) + if (!is(this)) set_prototype(&Bindings::ensure_web_prototype(realm, "EventTarget")); }