Skip to content

isActiveElement

Checks whether the element has focus. The mock compares against the global document.activeElement, so an element in a pop-out document never counts as active.

Import:

import 'obsidian-test-mocks/setup';

Signature:

function isActiveElement(this: Element): boolean

Parameters:

Parameter Type Description
this Element

Returns: boolean — true when the element is the active element.