hoverElement
Moves the pointer to the center of an element using trusted pointer input, then polls until the element actually matches :hover.
Desktop only — it throws on mobile, where :hover has no touch equivalent.
Import:
import { hoverElement } from 'obsidian-dev-utils/obsidian/trusted-input';Signature:
function hoverElement(params: HoverElementParams): Promise<void>Parameters:
| Parameter | Type | Description |
|---|---|---|
params | HoverElementParams | The element to hover. |
Returns: Promise<void> — A Promise that resolves once the element matches :hover.
Links to this page: