MCPcopy
hub / github.com/adobe/react-spectrum / setEventTarget

Function setEventTarget

packages/react-aria/src/interactions/utils.ts:32–35  ·  view source on GitHub ↗
(event: Event, target: Element)

Source from the content-addressed store, hash-verified

30}
31
32export function setEventTarget(event: Event, target: Element): void {
33 Object.defineProperty(event, 'target', {value: target});
34 Object.defineProperty(event, 'currentTarget', {value: target});
35}
36
37export function useSyntheticBlurEvent<Target extends Element = Element>(
38 onBlur: (e: ReactFocusEvent<Target>) => void

Callers 2

usePressFunction · 0.90
useFocusWithinFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected