Skip to content

UseIsBrowser

katanakit-js / useIsBrowser

function useIsBrowser(): boolean;

Defined in: infrastructure/dom/dom.service.ts:27

Checks whether the code is running in a browser environment.

boolean

true if both window and document are defined.

if (useIsBrowser()) {
// safe to access DOM APIs
}