OverlaySystem.parent¶
Summary¶
OverlaySystem.parent returns the DOM element that owns the overlay root. This is either the configured parent or a default derived from the canvas context.
Syntax¶
Parameters¶
This property does not take parameters.
Returns¶
HTMLElement - Parent element containing the overlay root.
Type Details¶
Example¶
const canvas = document.querySelector("canvas");
const wgpu = await WasmGPU.create(canvas);
const overlay = wgpu.createOverlay.system({ parent: document.body });
console.log(overlay.parent.tagName);