mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
LibWeb: Make factory methods of IDLEventListener and NodeFilter fallible
This commit is contained in:
parent
3689d58c64
commit
1f48081ee4
Notes:
sideshowbarker
2024-07-16 23:53:30 +09:00
Author: https://github.com/kennethmyhra
Commit: 1f48081ee4
Pull-request: https://github.com/SerenityOS/serenity/pull/17542
5 changed files with 8 additions and 7 deletions
|
@ -561,7 +561,7 @@ void EventTarget::activate_event_handler(DeprecatedFlyString const& name, HTML::
|
|||
// 5. Let listener be a new event listener whose type is the event handler event type corresponding to eventHandler and callback is callback.
|
||||
auto listener = realm.heap().allocate_without_realm<DOMEventListener>();
|
||||
listener->type = name;
|
||||
listener->callback = IDLEventListener::create(realm, *callback).ptr();
|
||||
listener->callback = IDLEventListener::create(realm, *callback).release_value_but_fixme_should_propagate_errors();
|
||||
|
||||
// 6. Add an event listener with eventTarget and listener.
|
||||
add_an_event_listener(*listener);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue