Call a JSX.EventHandlerUnion with the event.
(
event: TEvent & { currentTarget: T; target: Element },
handler: Solid.JSX.EventHandlerUnion<T, TEvent> | undefined,
)
| 395 | |
| 396 | /** Call a JSX.EventHandlerUnion with the event. */ |
| 397 | function callHandler<T, TEvent extends Event>( |
| 398 | event: TEvent & { currentTarget: T; target: Element }, |
| 399 | handler: Solid.JSX.EventHandlerUnion<T, TEvent> | undefined, |
| 400 | ) { |
| 401 | if (handler) { |
| 402 | if (typeof handler === 'function') { |
| 403 | handler(event) |
| 404 | } else { |
| 405 | handler[0](handler[1], event) |
| 406 | } |
| 407 | } |
| 408 | |
| 409 | return event.defaultPrevented |
| 410 | } |
| 411 | |
| 412 | function composeEventHandlers<T>( |
| 413 | handlers: Array<Solid.JSX.EventHandlerUnion<T, any> | undefined>, |
no test coverage detected