Function
fire
(type: string, target: EventTarget, y: number)
Source from the content-addressed store, hash-verified
| 24 | const startX = box.x + box.width / 2 |
| 25 | const startY = box.y + box.height / 2 |
| 26 | const fire = (type: string, target: EventTarget, y: number) => { |
| 27 | target.dispatchEvent( |
| 28 | new MouseEvent(type, { |
| 29 | bubbles: true, |
| 30 | cancelable: true, |
| 31 | button: 0, |
| 32 | clientX: startX, |
| 33 | clientY: y, |
| 34 | }), |
| 35 | ) |
| 36 | } |
| 37 | fire('mousedown', handle, startY) |
| 38 | // Drag downward well past the panel's height to fall below the 70px minimum. |
| 39 | for (let i = 1; i <= 10; i++) { |
Tested by
no test coverage detected