MCPcopy Create free account
hub / github.com/ReactTooltip/react-tooltip / dispatch

Function dispatch

src/components/Tooltip/event-delegation.ts:31–35  ·  view source on GitHub ↗
(event: Event)

Source from the content-addressed store, hash-verified

29 if (!listener) {
30 const handlers = new Set<Handler>()
31 const dispatch = (event: Event): void => {
32 handlers.forEach((handler) => {
33 handler(event)
34 })
35 }
36 listener = { handlers, dispatch, eventType, capture }
37 handlersByType.set(key, listener)
38 document.addEventListener(eventType, dispatch, { capture })

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected