跳转到内容

toDataURL

toDataURL(canvasEl, format, quality): string

Parameters

canvasEl: HTMLCanvasElement

to copy size and content of

format: ImageFormat

‘jpeg’ or ‘png’, in some browsers ‘webp’ is ok too

quality: number

<= 1 and > 0

Returns

string

data url

Defined in

src/util/misc/dom.ts:53