From 79da6a5ee8f6dd4589572f2fa8654b3234cc2b1e Mon Sep 17 00:00:00 2001 From: Zhengbo Li Date: Fri, 1 May 2015 11:33:53 -0700 Subject: [PATCH 1/2] Fix issue #2984 --- src/lib/dom.generated.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/dom.generated.d.ts b/src/lib/dom.generated.d.ts index 6d3f5985c5b..8e9039a3b6b 100644 --- a/src/lib/dom.generated.d.ts +++ b/src/lib/dom.generated.d.ts @@ -3697,6 +3697,7 @@ 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: string, ...args: any[]): CanvasRenderingContext2D | WebGLRenderingContext; /** * Returns a blob object encoded as a Portable Network Graphics (PNG) format from a canvas image or drawing. From 69a76a3b666e24bd313b1d8abebe4d9494f67080 Mon Sep 17 00:00:00 2001 From: Zhengbo Li Date: Fri, 1 May 2015 12:25:30 -0700 Subject: [PATCH 2/2] cf feedback --- src/lib/dom.generated.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/dom.generated.d.ts b/src/lib/dom.generated.d.ts index 8e9039a3b6b..00b4e8ea570 100644 --- a/src/lib/dom.generated.d.ts +++ b/src/lib/dom.generated.d.ts @@ -3698,6 +3698,7 @@ interface HTMLCanvasElement extends HTMLElement { * @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.