MouseWheel
Simulate mouse wheel scrolling at specific coordinates to test and debug scroll interactions in Observable notebooks, including horizontal and vertical offsets with adjustable duration.
Instructions
Simulate a mouse wheel scroll at a position.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | X coordinate (relative to element if selector provided, otherwise viewport) | |
| y | No | Y coordinate (relative to element if selector provided, otherwise viewport) | |
| label | No | Optional label describing the intent of this action (e.g., "expand plot", "zoom in"). Displayed in the notebook's event log overlay. | |
| deltaX | No | Horizontal scroll amount. Default: 0 | |
| deltaY | No | Vertical scroll amount (positive = scroll down). Default: 0 | |
| duration | No | Duration of scroll animation in milliseconds. Default: 300 | |
| notebook | No | Target notebook (URL, path like "index" or "voronoi", or index like "0"). Optional if you've used FocusNotebook or only one notebook is connected. | |
| selector | No | CSS selector for target element. If provided, position is relative to element. | |
| timeout_ms | No | Maximum time to wait in milliseconds |