Skip to content

Commit bc8b9ee

Browse files
author
Zhengbo Li
committed
Merge pull request microsoft#2990 from zhengbli/issue2984
Added overloads for HTMLCanvasElement.getContext method
2 parents 3bd4dd4 + 69a76a3 commit bc8b9ee

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/lib/dom.generated.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3697,6 +3697,8 @@ interface HTMLCanvasElement extends HTMLElement {
36973697
* 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.
36983698
* @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");
36993699
*/
3700+
getContext(contextId: "2d"): CanvasRenderingContext2D;
3701+
getContext(contextId: "experimental-webgl"): WebGLRenderingContext;
37003702
getContext(contextId: string, ...args: any[]): CanvasRenderingContext2D | WebGLRenderingContext;
37013703
/**
37023704
* Returns a blob object encoded as a Portable Network Graphics (PNG) format from a canvas image or drawing.

0 commit comments

Comments
 (0)