Skip to main content

Interface: WindowHandle

Defined in: adapter.ts:165

A window an adapter spawned, before its panel necessarily exists.

createWindow itself stays adapter-specific because the config payload differs per engine, but what it hands back is the same everywhere: an id, a panel once there is one, and a one-shot readiness callback.

Properties

PropertyModifierTypeDescriptionDefined in
idreadonlystringThe window's id - the one passed in, or one the adapter generated.adapter.ts:167
panelreadonlyPanelHandle | undefinedThe live panel, or undefined until the adapter has attached the document. IWSDK loads and parses the markup over later frames; the three.js host interprets it during createWindow, so there it is set straight away.adapter.ts:174

Methods

onReady()

onReady(listener: (panel: PanelHandle) => void): () => void;

Defined in: adapter.ts:180

Run listener once, when the panel is attached. Fires immediately if it already is, so wiring order never matters. Returns an unsubscribe function for the case where the caller gives up first.

Parameters

ParameterType
listener(panel: PanelHandle) => void

Returns

() => void