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

Method incOnClick

src/system/pointer/mouse.ts:36–48  ·  view source on GitHub ↗
(button: number)

Source from the content-addressed store, hash-verified

34 private count: Record<number, number | undefined> = {}
35
36 incOnClick(button: number) {
37 const current =
38 this.down[button] === undefined
39 ? undefined
40 : Number(this.down[button]) + 1
41
42 this.count =
43 this.count[button] === undefined
44 ? {}
45 : {[button]: Number(this.count[button]) + 1}
46
47 return current
48 }
49
50 getOnDown(button: number) {
51 this.down = {[button]: this.count[button] ?? 0}

Callers 1

getEventInitMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected