From 9c8796da0b428acccd8fdf8ac0674ba10a87666d Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Wed, 27 Sep 2023 18:05:19 +0000 Subject: [PATCH] Fix type of `ImageData#data` --- api-reports/2_12.txt | 2 +- api-reports/2_13.txt | 2 +- dom/src/main/scala/org/scalajs/dom/ImageData.scala | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api-reports/2_12.txt b/api-reports/2_12.txt index eb5476bc1..5d3785054 100644 --- a/api-reports/2_12.txt +++ b/api-reports/2_12.txt @@ -15465,7 +15465,7 @@ ImageBitmap[JT] def width: Double ImageCapture[JC] def grabFrame(): js.Promise[ImageBitmap] ImageCapture[JC] def takePhoto(): js.Promise[Blob] ImageCapture[JC] val track: MediaStreamTrack -ImageData[JC] def data: js.Array[Int] +ImageData[JC] def data: js.typedarray.Uint8ClampedArray ImageData[JC] def height: Int ImageData[JC] def width: Int InputEvent[JC] def bubbles: Boolean diff --git a/api-reports/2_13.txt b/api-reports/2_13.txt index eb5476bc1..5d3785054 100644 --- a/api-reports/2_13.txt +++ b/api-reports/2_13.txt @@ -15465,7 +15465,7 @@ ImageBitmap[JT] def width: Double ImageCapture[JC] def grabFrame(): js.Promise[ImageBitmap] ImageCapture[JC] def takePhoto(): js.Promise[Blob] ImageCapture[JC] val track: MediaStreamTrack -ImageData[JC] def data: js.Array[Int] +ImageData[JC] def data: js.typedarray.Uint8ClampedArray ImageData[JC] def height: Int ImageData[JC] def width: Int InputEvent[JC] def bubbles: Boolean diff --git a/dom/src/main/scala/org/scalajs/dom/ImageData.scala b/dom/src/main/scala/org/scalajs/dom/ImageData.scala index 1c048a1cd..ebf20f1d7 100644 --- a/dom/src/main/scala/org/scalajs/dom/ImageData.scala +++ b/dom/src/main/scala/org/scalajs/dom/ImageData.scala @@ -23,7 +23,7 @@ class ImageData extends js.Object { /** Is a Uint8ClampedArray representing a one-dimensional array containing the data in the RGBA order, with integer * values between 0 and 255 (included). */ - def data: js.Array[Int] = js.native + def data: js.typedarray.Uint8ClampedArray = js.native /** Is an unsigned long representing the actual height, in pixels, of the ImageData. */ def height: Int = js.native