createWindowPoolDefinition
constcreateWindowPoolDefinition: (shape,config?,options?) =>WindowPoolDefinition=createWindowPool
Defined in: renderer/PooledWindow.tsx:110
Create a pool definition. The shape props (transparent, frame, etc.) are fixed for all windows in this pool — consumers cannot override them per-use.
Call this once at module level and reuse across renders.
Parameters
Section titled “Parameters”Immutable creation-only props shared by all pool windows
config?
Section titled “config?”Pool sizing and eviction config
options?
Section titled “options?”Additional options
injectStyles?
Section titled “injectStyles?”How to inject styles into pool windows.
- “auto”: Copy
- false: No injection (for CSS-in-JS frameworks)
- function: Custom injection (REPLACES auto mirroring)
onWindowSetup?
Section titled “onWindowSetup?”Per-window setup hook. Runs once for each
window the pool creates (including pre-warmed idle windows), after
<base>, styles, and the #root portal container are in place — and
before React portals any content in. Must be synchronous. Use it for
realm-specific initialization on the child window — custom element
registration, prototype patches, etc. Additive: runs regardless of
injectStyles mode. Optionally return a cleanup function; it runs
when the window is destroyed. See WindowSetupCallback for the
full contract.