summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-09-03 15:56:47 +0200
committerAndreas Kling <kling@serenityos.org>2022-09-06 00:27:09 +0200
commitdd9cd3050babe46e7a8a445287c33828747a07e8 (patch)
treef86058dd8264913d93e5ca4812b27d1cb7f3c202
parent1029ea4b3240ba22f132ae390f5dd9b49a778659 (diff)
downloadserenity-dd9cd3050babe46e7a8a445287c33828747a07e8.zip
LibWeb: Use correct Window object when dispatching Document load event
-rw-r--r--Userland/Libraries/LibWeb/DOM/Document.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp
index 895511768a..a559232306 100644
--- a/Userland/Libraries/LibWeb/DOM/Document.cpp
+++ b/Userland/Libraries/LibWeb/DOM/Document.cpp
@@ -1410,8 +1410,8 @@ void Document::completely_finish_loading()
}
// Otherwise, if container is non-null, then queue an element task on the DOM manipulation task source given container to fire an event named load at container.
else if (container) {
- container->queue_an_element_task(HTML::Task::Source::DOMManipulation, [container, this]() mutable {
- container->dispatch_event(*DOM::Event::create(window(), HTML::EventNames::load));
+ container->queue_an_element_task(HTML::Task::Source::DOMManipulation, [container]() mutable {
+ container->dispatch_event(*DOM::Event::create(container->window(), HTML::EventNames::load));
});
}
}