Skip to content

WindowContextValue

Defined in: renderer/context.ts:12

Internal window context value.

State is intentionally omitted — consumers use useSyncExternalStore via subscribe/getSnapshot to opt in to re-renders only when they care about a specific piece of state. This prevents all portal children from re-rendering on every window state change.

document: Document | null

Defined in: renderer/context.ts:29

The child window’s Document object. Use this to portal overlays (Radix, Base UI, etc.) to the correct document.


getDisplaySnapshot: () => DisplayInfo | null

Defined in: renderer/context.ts:23

Get current display snapshot

DisplayInfo | null


getSnapshot: () => WindowState | null

Defined in: renderer/context.ts:20

Get current state snapshot

WindowState | null


subscribe: (listener) => () => void

Defined in: renderer/context.ts:17

Subscribe to state changes

() => void

(): void

void


windowId: string | null

Defined in: renderer/context.ts:14

Current window ID