MCPcopy Index your code
hub / github.com/CapSoftware/Cap / composeEventHandlers

Function composeEventHandlers

apps/desktop/src/utils/composeEventHandlers.ts:18–26  ·  view source on GitHub ↗
(
	handlers: Array<JSX.EventHandlerUnion<T, E> | undefined>,
)

Source from the content-addressed store, hash-verified

16}
17
18export function composeEventHandlers<T, E extends Event = Event>(
19 handlers: Array<JSX.EventHandlerUnion<T, E> | undefined>,
20) {
21 return (event: E & { currentTarget: T; target: Element }) => {
22 for (const handler of handlers) {
23 callHandler(event, handler);
24 }
25 };
26}

Callers 4

BoundInputFunction · 0.90
TextInputFunction · 0.90
BoundInputFunction · 0.90
TextInputFunction · 0.90

Calls 1

callHandlerFunction · 0.85

Tested by

no test coverage detected