Skip to content

useWindowDocument

useWindowDocument(): Document

Defined in: renderer/hooks/useWindowState.ts:14

Returns the child window’s Document object.

Use this to portal UI library overlays (Radix UI, Base UI, etc.) to the correct document — Radix’s default is the parent window’s document, which causes portals to render in the wrong window.

Document

if called outside an open <Window> or <PooledWindow>