Skip to content

isShown

Checks whether the element is shown: attached to the DOM with no ancestor hidden by display: none. The mock relies on offsetParent, which jsdom leaves null, so it reports false unless a test defines offsetParent.

Import:

import 'obsidian-test-mocks/setup';

Signature:

function isShown(this: HTMLElement): boolean

Parameters:

Parameter Type Description
this HTMLElement

Returns: boolean — true when the element has an offset parent.