MCPcopy Create free account
hub / github.com/editablejs/editable / getNativeEvent

Function getNativeEvent

packages/editor/src/utils/event.ts:27–34  ·  view source on GitHub ↗
(event: any)

Source from the content-addressed store, hash-verified

25}
26
27export const getNativeEvent = (event: any) => {
28 const { nativeEvent } = event
29 event = nativeEvent ?? event
30 if (isTouchEvent(event)) {
31 return event.touches[0] || event.changedTouches[0]
32 }
33 return event
34}

Callers 2

findEventPointFunction · 0.90
handleRootMouseDownFunction · 0.90

Calls 1

isTouchEventFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…