MCPcopy Create free account
hub / github.com/testing-library/user-event / dispatchDOMEvent

Function dispatchDOMEvent

src/event/dispatchEvent.ts:66–73  ·  view source on GitHub ↗
(
  target: Element,
  type: K,
  init?: EventTypeInit<K>,
)

Source from the content-addressed store, hash-verified

64}
65
66export function dispatchDOMEvent<K extends EventType>(
67 target: Element,
68 type: K,
69 init?: EventTypeInit<K>,
70) {
71 const event = createEvent(type, target, init)
72 wrapEvent(() => target.dispatchEvent(event), target)
73}

Callers 3

prepareDocumentFunction · 0.90
patchedFocusFunction · 0.90
patchedBlurFunction · 0.90

Calls 2

createEventFunction · 0.90
wrapEventFunction · 0.90

Tested by

no test coverage detected