mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 03:09:39 -06:00
Merge pull request #2990 from zhengbli/issue2984
Added overloads for HTMLCanvasElement.getContext method
This commit is contained in:
commit
bc8b9ee39d
2
src/lib/dom.generated.d.ts
vendored
2
src/lib/dom.generated.d.ts
vendored
@ -3697,6 +3697,8 @@ interface HTMLCanvasElement extends HTMLElement {
|
||||
* 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.
|
||||
* @param contextId The identifier (ID) of the type of canvas to create. Internet Explorer 9 and Internet Explorer 10 support only a 2-D context using canvas.getContext("2d"); IE11 Preview also supports 3-D or WebGL context using canvas.getContext("experimental-webgl");
|
||||
*/
|
||||
getContext(contextId: "2d"): CanvasRenderingContext2D;
|
||||
getContext(contextId: "experimental-webgl"): WebGLRenderingContext;
|
||||
getContext(contextId: string, ...args: any[]): CanvasRenderingContext2D | WebGLRenderingContext;
|
||||
/**
|
||||
* Returns a blob object encoded as a Portable Network Graphics (PNG) format from a canvas image or drawing.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user