Skip to content

Lib.unhoverElement method

Lib › unhoverElement

Moves the mouse pointer to a point just outside an element's bounding box using a **trusted** Electron pointer move, then polls until the element no longer matches :hover.

The inverse of Lib.hoverElement. It targets the single shared window's **global** pointer, so only one element is hovered at a time. When an element spans the full viewport (no point outside its box is reachable), use Lib.moveMouse directly to move the pointer to a known empty coordinate instead.

Signature:

unhoverElement(this: void, params: UnhoverElementParams): Promise<void>

Parameters:

ParameterTypeDescription
thisvoid
paramsUnhoverElementParamsThe element to move the pointer away from.

Returns: Promise<void>A Promise that resolves once the element no longer matches :hover.