WebGpuTerminalRendererOptions
Properties
Section titled “Properties”adapterPolicy?
Section titled “adapterPolicy?”
optionaladapterPolicy?:"hardware"|"any"
Eligibility for initial built-in acquisition; custom device factories own their policy.
canvas
Section titled “canvas”canvas:
HTMLCanvasElement|OffscreenCanvas
columns
Section titled “columns”columns:
number
cursorBlink?
Section titled “cursorBlink?”
optionalcursorBlink?:boolean
deviceFactory?
Section titled “deviceFactory?”
optionaldeviceFactory?: () =>Promise<GPUDevice>
Returns
Section titled “Returns”Promise<GPUDevice>
font:
TerminalFittedFont
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
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
retainDisplayedText?
Section titled “retainDisplayedText?”
optionalretainDisplayedText?:boolean
rows:
number
schedulerClock?
Section titled “schedulerClock?”
optionalschedulerClock?:RenderSchedulerClock
theme?
Section titled “theme?”
optionaltheme?:Partial<RendererTheme>