pull/17497/merge
Ben Josua 21 hours ago committed by GitHub
commit a9e1747c3a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -60,7 +60,9 @@ export function Attribute(node, context) {
}
node.metadata.delegated =
parent?.type === 'RegularElement' && can_delegate_event(node.name.slice(2));
parent?.type === 'RegularElement' &&
can_delegate_event(node.name.slice(2)) &&
!context.state.analysis.custom_element;
}
}
}

@ -258,7 +258,13 @@ export function handle_event_propagation(event) {
// -> the target could not have been disabled because it emits the event in the first place
event.target === current_target)
) {
delegated.call(current_target, event);
if (Array.isArray(delegated)) {
for (const handler of delegated) {
handler.call(current_target, event);
}
} else if (typeof delegated === "function") {
delegated.call(current_target, event);
}
}
} catch (error) {
if (throw_error) {

Loading…
Cancel
Save