(touches: Touch[])
| 369 | } |
| 370 | |
| 371 | function buildTouchList(touches: Touch[]): MutableTouchList { |
| 372 | const touchList: MutableTouchList = { |
| 373 | length: touches.length, |
| 374 | item: (index: number) => touches[index] ?? null, |
| 375 | identifiedTouch: (identifier: number) => touches.find((touch) => touch.identifier === identifier) ?? touches[0] ?? buildTouch(), |
| 376 | [Symbol.iterator]: () => touches[Symbol.iterator](), |
| 377 | }; |
| 378 | |
| 379 | touches.forEach((touch, index) => { |
| 380 | touchList[index] = touch; |
| 381 | }); |
| 382 | |
| 383 | return touchList; |
| 384 | } |
| 385 | |
| 386 | function defineEventMethodOverrides( |
| 387 | event: Event, |
no test coverage detected