MCPcopy Index your code
hub / github.com/gridstack/gridstack.js / createMockTouchList

Function createMockTouchList

spec/dd-touch-spec.ts:28–35  ·  view source on GitHub ↗
(touches: Touch[])

Source from the content-addressed store, hash-verified

26
27// Helper function to create mock TouchList
28function createMockTouchList(touches: Touch[]): TouchList {
29 const touchList = {
30 length: touches.length,
31 item: (index: number) => touches[index] || null,
32 ...touches
33 };
34 return touchList as TouchList;
35}
36
37// Helper function to create mock TouchEvent
38function createMockTouchEvent(type: string, touches: Touch[], options: Partial<TouchEvent> = {}): TouchEvent {

Callers 1

createMockTouchEventFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected