We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f27ac59 commit 8995b76Copy full SHA for 8995b76
src/Webapi/Webapi__Canvas.res
@@ -18,3 +18,16 @@ module CanvasElement = {
18
@get external width: Dom.element => int = "width"
19
@set external setWidth: (Dom.element, int) => unit = "width"
20
}
21
+
22
+module OffscreenCanvas = {
23
+ type t
24
+ @new external make: (~width: float, ~height: float) => t = "OffscreenCanvas"
25
26
+ @send external getContext2d: (t, @as("2d") _) => Canvas2d.t = "getContext"
27
+ @send external getContextWebGl: (t, @as("webgl") _) => WebGl.glT = "getContext"
28
29
+ @get external height: t => int = "height"
30
+ @set external setHeight: (t, int) => unit = "height"
31
+ @get external width: t => int = "width"
32
+ @set external setWidth: (t, int) => unit = "width"
33
+}
0 commit comments