interface dom.HTMLCanvasElement
implements HTMLElement
import { type dom } from "https://deno.land/x/evt@v2.4.22/lib/index.ts";
const { HTMLCanvasElement } = dom;
Provides properties and methods for manipulating the layout and presentation of elements. The HTMLCanvasElement interface also inherits the properties and methods of the HTMLElement interface.
Methods
getContext(contextId: "2d", options?: CanvasRenderingContext2DSettings): CanvasRenderingContext2D | null
Returns an object that provides methods and properties for drawing and manipulating images and graphics on a canvas element in a document. A context object includes information about colors, line widths, fonts, and other graphic parameters that can be drawn on a canvas.
getContext(contextId: "bitmaprenderer", options?: ImageBitmapRenderingContextSettings): ImageBitmapRenderingContext | null
getContext(contextId: "webgl", options?: WebGLContextAttributes): WebGLRenderingContext | null
getContext(contextId: "webgl2", options?: WebGLContextAttributes): WebGL2RenderingContext | null
getContext(contextId: string, options?: any): RenderingContext | null
Returns the content of the current canvas as an image that you can use as a source for another canvas or an HTML element.
transferControlToOffscreen(): OffscreenCanvas
addEventListener<K extends keyof HTMLElementEventMap>(): void
type: K,
listener: (this: HTMLCanvasElement, ev: HTMLElementEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
addEventListener(): void
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
removeEventListener<K extends keyof HTMLElementEventMap>(): void
type: K,
listener: (this: HTMLCanvasElement, ev: HTMLElementEventMap[K]) => any,
options?: boolean | EventListenerOptions,