FluentUI Compat

Home > @cascadiacollections/fluentui-compat > getWindow

getWindow() function

Gets the window object associated with a DOM element. Returns undefined if the element is not in a browser environment.

This is a minimal implementation for use with the Async class, providing cross-environment compatibility.

Signature:

export declare function getWindow(element?: Element | null): Window | undefined;

Parameters

Parameter

Type

Description

element

Element | null

(Optional) Optional element to get the window from

Returns:

Window | undefined

The window object or undefined if not in a browser environment

  • Edit this page
In this article
Back to top FluentUI React complimentary components and utilities focused on render performance