You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/DOMAPI/HTMLCanvasElement.res
+14-14Lines changed: 14 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -701,10 +701,10 @@ Creates a CanvasRenderingContext2D object representing a two-dimensional renderi
701
701
[Read more on MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext#2d)
702
702
*/
703
703
@send
704
-
externalgetContext2D: (
704
+
externalgetContext_2D: (
705
705
htmlCanvasElement,
706
706
@as("2d") _,
707
-
~options: canvasRenderingContext2D=?,
707
+
~options: canvasRenderingContext2DSettings=?,
708
708
) =>canvasRenderingContext2D="getContext"
709
709
710
710
/**
@@ -713,35 +713,35 @@ Returns an object that provides methods and properties for drawing and manipulat
713
713
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLCanvasElement/getContext)
714
714
*/
715
715
@send
716
-
externalgetContext2: (
716
+
externalgetContext_WebGL: (
717
717
htmlCanvasElement,
718
-
~contextId: string,
719
-
~options: JSON.t=?,
720
-
) =>imageBitmapRenderingContext="getContext"
718
+
@as("webgl") _,
719
+
~options: webGLContextAttributes=?,
720
+
) =>webGLRenderingContext="getContext"
721
721
722
722
/**
723
723
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.
724
724
@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");
725
725
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLCanvasElement/getContext)
726
726
*/
727
727
@send
728
-
externalgetContext3: (
728
+
externalgetContext_WebGL2: (
729
729
htmlCanvasElement,
730
-
~contextId: string,
731
-
~options: JSON.t=?,
732
-
) =>webGLRenderingContext="getContext"
730
+
@as("webgl2") _,
731
+
~options: webGLContextAttributes=?,
732
+
) =>webGL2RenderingContext="getContext"
733
733
734
734
/**
735
735
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.
736
736
@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");
737
737
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLCanvasElement/getContext)
738
738
*/
739
739
@send
740
-
externalgetContext4: (
740
+
externalgetContext_BitmapRenderer: (
741
741
htmlCanvasElement,
742
-
~contextId: string,
743
-
~options: JSON.t=?,
744
-
) =>webGL2RenderingContext="getContext"
742
+
@as("bitmaprenderer") _,
743
+
~options: imageBitmapRenderingContextSettings=?,
744
+
) =>imageBitmapRenderingContext="getContext"
745
745
746
746
/**
747
747
Returns the content of the current canvas as an image that you can use as a source for another canvas or an HTML element.
0 commit comments