fix: re-throw errors in delegated event listeners (#2382)
This commit is contained in:
parent
372a241d78
commit
943a992570
|
@ -150,7 +150,10 @@ pub(crate) fn add_delegated_event_listener(
|
|||
if !maybe_handler.is_undefined() {
|
||||
let f = maybe_handler
|
||||
.unchecked_ref::<js_sys::Function>();
|
||||
let _ = f.call1(&node, &ev);
|
||||
|
||||
if let Err(e) = f.call1(&node, &ev) {
|
||||
wasm_bindgen::throw_val(e);
|
||||
}
|
||||
|
||||
if ev.cancel_bubble() {
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue