mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 13:02:09 +02:00
LibWeb: Make DOM::Event and all its subclasses GC-allocated
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 07:28:23 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/7c3db526b0 Pull-request: https://github.com/SerenityOS/serenity/pull/14816 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/linusg ✅
@@ -26,7 +26,7 @@ HTMLImageElement::HTMLImageElement(DOM::Document& document, DOM::QualifiedName q
|
||||
set_needs_style_update(true);
|
||||
this->document().set_needs_layout();
|
||||
queue_an_element_task(HTML::Task::Source::DOMManipulation, [this] {
|
||||
dispatch_event(DOM::Event::create(EventNames::load));
|
||||
dispatch_event(*DOM::Event::create(this->document().preferred_window_object(), EventNames::load));
|
||||
});
|
||||
};
|
||||
|
||||
@@ -35,7 +35,7 @@ HTMLImageElement::HTMLImageElement(DOM::Document& document, DOM::QualifiedName q
|
||||
set_needs_style_update(true);
|
||||
this->document().set_needs_layout();
|
||||
queue_an_element_task(HTML::Task::Source::DOMManipulation, [this] {
|
||||
dispatch_event(DOM::Event::create(EventNames::error));
|
||||
dispatch_event(*DOM::Event::create(this->document().preferred_window_object(), EventNames::error));
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user