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

Function getMouseEventButton

src/system/pointer/buttons.ts:66–72  ·  view source on GitHub ↗
(button?: MouseButton)

Source from the content-addressed store, hash-verified

64 2: 1,
65} as const
66export function getMouseEventButton(button?: MouseButton): number {
67 button = getMouseButtonId(button)
68 if (button in MouseButtonFlip) {
69 return MouseButtonFlip[button as keyof typeof MouseButtonFlip]
70 }
71 return button
72}

Callers 3

downMethod · 0.90
getEventInitMethod · 0.90
getEventInitMethod · 0.90

Calls 1

getMouseButtonIdFunction · 0.85

Tested by

no test coverage detected