Skip to main content

isPageVisible

Detect whether the document is visible. In a non browser environment, it always returns true.

API

function isPageVisible(): boolean;

Example

import { isPageVisible } from "@lilib/utils";

if (isPageVisible()) {
// Do something.
}