Skip to content

Commit

Permalink
Browser. Strict canvas property [generated]
Browse files Browse the repository at this point in the history
  • Loading branch information
turansky committed Mar 2, 2024
1 parent cac5077 commit 102cc22
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
package web.gl

import js.array.ReadonlyArray
import web.events.EventTarget
import web.images.PredefinedColorSpace

sealed external interface WebGLRenderingContextBase {
/**
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/canvas)
*/
val canvas: Any /* HTMLCanvasElement | OffscreenCanvas */
val canvas: EventTarget /* HTMLCanvasElement | OffscreenCanvas */
var drawingBufferColorSpace: PredefinedColorSpace

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
package web.images

import seskar.js.JsValue
import web.events.EventTarget
import web.rendering.OffscreenRenderingContext
import web.rendering.RenderingContext
import web.rendering.RenderingContextId
Expand All @@ -16,7 +17,7 @@ sealed external class ImageBitmapRenderingContext :
/**
* Returns the canvas element that the context is bound to.
*/
val canvas: Any /* HTMLCanvasElement | OffscreenCanvas */
val canvas: EventTarget /* HTMLCanvasElement | OffscreenCanvas */

/**
* Transfers the underlying bitmap data from imageBitmap to context, and the bitmap becomes the contents of the canvas element to which context is bound.
Expand Down

0 comments on commit 102cc22

Please sign in to comment.