MCPcopy Index your code
hub / github.com/adobe/react-spectrum / createEvent

Function createEvent

packages/react-aria/src/interactions/usePress.ts:1098–1111  ·  view source on GitHub ↗
(target: FocusableElement, e: EventBase)

Source from the content-addressed store, hash-verified

1096}
1097
1098function createEvent(target: FocusableElement, e: EventBase): EventBase {
1099 let clientX = e.clientX;
1100 let clientY = e.clientY;
1101 return {
1102 currentTarget: target,
1103 shiftKey: e.shiftKey,
1104 ctrlKey: e.ctrlKey,
1105 metaKey: e.metaKey,
1106 altKey: e.altKey,
1107 clientX,
1108 clientY,
1109 key: e.key
1110 };
1111}
1112
1113interface Rect {
1114 top: number;

Callers 4

usePressFunction · 0.85
pressUpFunction · 0.85
onClickFunction · 0.85
onKeyUpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected