WebGpuTerminalRendererOptions
Properties
Section titled “Properties”adapterPolicy?
Section titled “adapterPolicy?”
optionaladapterPolicy?:"hardware"|"any"
Eligibility for initial built-in acquisition; custom device factories own their policy.
optionalbidi?:boolean
canvas
Section titled “canvas”canvas:
HTMLCanvasElement|OffscreenCanvas
columns
Section titled “columns”columns:
number
compositorAsset?
Section titled “compositorAsset?”
optionalcompositorAsset?:string|URL
URL for the Canvas 2D pixel compositor. Defaults to the shipped SIMD/scalar pair.
cursorBlink?
Section titled “cursorBlink?”
optionalcursorBlink?:boolean
deviceFactory?
Section titled “deviceFactory?”
optionaldeviceFactory?: () =>Promise<GPUDevice>
Returns
Section titled “Returns”Promise<GPUDevice>
deviceOwner?
Section titled “deviceOwner?”
optionaldeviceOwner?:DeviceOwner
Terminals sharing one owner share its device; overrides deviceFactory and adapterPolicy.
font:
TerminalFittedFont
frameCoordinator?
Section titled “frameCoordinator?”
optionalframeCoordinator?:FrameCoordinator
Terminals sharing one coordinator paint in one animation frame and one queue submit.
ligatures?
Section titled “ligatures?”
optionalligatures?:LigatureFinder
Joins programming ligatures in the primary font; absent keeps the per-cell path.
needsFrameRows?
Section titled “needsFrameRows?”
optionalneedsFrameRows?: () =>boolean
Return false for cursor-only snapshots; row data resumes with the full viewport.
Returns
Section titled “Returns”boolean
onCleanUpdate?
Section titled “onCleanUpdate?”
optionalonCleanUpdate?: () =>void
Called after a clean render-state update needs no painting or row notification.
Returns
Section titled “Returns”void
onError?
Section titled “onError?”
optionalonError?: (cause) =>void
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”void
onFrame?
Section titled “onFrame?”
optionalonFrame?: (snapshot) =>void
Parameters
Section titled “Parameters”snapshot
Section titled “snapshot”Returns
Section titled “Returns”void
onRowsChanged?
Section titled “onRowsChanged?”
optionalonRowsChanged?: (rows) =>void
Painted row IDs without requesting cell data.
Parameters
Section titled “Parameters”readonly number[]
Returns
Section titled “Returns”void
onRowsPainted?
Section titled “onRowsPainted?”
optionalonRowsPainted?: (rows) =>void
Parameters
Section titled “Parameters”readonly RenderRow[]
Returns
Section titled “Returns”void
onTextFrame?
Section titled “onTextFrame?”
optionalonTextFrame?: (snapshot) =>void
Owned row text with lazily decoded cell strings and continuation flags.
Parameters
Section titled “Parameters”snapshot
Section titled “snapshot”Returns
Section titled “Returns”void
presentation?
Section titled “presentation?”
optionalpresentation?:TerminalPresentation
immediate prefers WebGL2 with a desynchronized canvas and paints writes without waiting for a frame.
reducedMotion?
Section titled “reducedMotion?”
optionalreducedMotion?:boolean
rendererMode?
Section titled “rendererMode?”
optionalrendererMode?:TerminalRendererMode
renderState
Section titled “renderState”renderState:
GhosttyRenderState|RenderStateSource
replaceCanvas?
Section titled “replaceCanvas?”
optionalreplaceCanvas?: () =>HTMLCanvasElement|OffscreenCanvas
Returns
Section titled “Returns”HTMLCanvasElement | OffscreenCanvas
replacementDeviceOwner?
Section titled “replacementDeviceOwner?”
optionalreplacementDeviceOwner?:DeviceOwner
Owner of devices that replace a lost one; defaults to deviceOwner.
retainDisplayedText?
Section titled “retainDisplayedText?”
optionalretainDisplayedText?:boolean
rows:
number
schedulerClock?
Section titled “schedulerClock?”
optionalschedulerClock?:RenderSchedulerClock
textBlink?
Section titled “textBlink?”
optionaltextBlink?:boolean
Opt-in SGR 5/6 animation; native Ghostty renders this text steadily.
theme?
Section titled “theme?”
optionaltheme?:Partial<RendererTheme>