MCPcopy Index your code
hub / github.com/ChartGPU/ChartGPU / isHTMLCanvasElement

Function isHTMLCanvasElement

src/core/GPUContext.ts:40–42  ·  view source on GitHub ↗
(canvas: SupportedCanvas)

Source from the content-addressed store, hash-verified

38
39/** Reliable type guard - instanceof works in workers where HTMLCanvasElement is undefined. */
40export function isHTMLCanvasElement(canvas: SupportedCanvas): canvas is HTMLCanvasElement {
41 return typeof HTMLCanvasElement !== 'undefined' && canvas instanceof HTMLCanvasElement;
42}
43
44/** Gets display dimensions - clientWidth/Height for HTMLCanvasElement, width/height for OffscreenCanvas. */
45function getCanvasDimensions(canvas: SupportedCanvas): { width: number; height: number } {

Callers 8

getCanvasCssWidthFunction · 0.90
getCanvasCssHeightFunction · 0.90
createRenderCoordinatorFunction · 0.90
getPlotSizeCssPxFunction · 0.90
renderFunction · 0.90
getCanvasDimensionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected