clickElement
Clicks the center of an element using trusted touch input, injected into the WebView by the host over CDP.
The element-relative counterpart of clickMouse. button: 'right' is the long-press that opens Obsidian Mobile’s context menu; 'middle' throws, because touch has no gesture for it and inventing one would be worse than saying so.
Import:
import { clickElement } from '@mnaoumov/obsidian-lib/mobile-trusted-input';Signature:
function clickElement(params: ClickElementParams): Promise<void>Parameters:
| Parameter | Type | Description |
|---|---|---|
params |
ClickElementParams | The element to click, 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: