clickMouse
Clicks at the given viewport coordinates using trusted touch input, injected by the host over CDP.
The coordinates are CSS pixels in the WebView’s own viewport — which is what CDP takes — so devicePixelRatio never enters the picture.
Import:
import { clickMouse } from 'obsidian-dev-utils/obsidian/mobile-trusted-input';Signature:
function clickMouse(params: ClickMouseParams): Promise<void>Parameters:
| Parameter | Type | Description |
|---|---|---|
params | ClickMouseParams | The viewport coordinates to click at, the button to press and any modifiers to hold. |
Returns: Promise<void> — A Promise that resolves once the click has been injected.
Links to this page: