From 3a548921daf43bf99a363083bc45ce8bc3b92df2 Mon Sep 17 00:00:00 2001 From: Yilin Wei Date: Sun, 8 Oct 2023 16:20:58 +0100 Subject: [PATCH] `data` is required. --- dom/src/main/scala/org/scalajs/dom/BlobEvent.scala | 10 +++------- dom/src/main/scala/org/scalajs/dom/BlobEventInit.scala | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/dom/src/main/scala/org/scalajs/dom/BlobEvent.scala b/dom/src/main/scala/org/scalajs/dom/BlobEvent.scala index bbe42c59..317d805a 100644 --- a/dom/src/main/scala/org/scalajs/dom/BlobEvent.scala +++ b/dom/src/main/scala/org/scalajs/dom/BlobEvent.scala @@ -8,13 +8,9 @@ import scala.scalajs.js.annotation._ @js.native class BlobEvent(typeArg: String, init: js.UndefOr[BlobEventInit]) extends Event(typeArg, init) { - def this(typeArg: String) = { - this(typeArg, js.undefined) + def this(init: BlobEventInit) = { + this("dataavailable", init) } - def this() = { - this("dataavailable", js.undefined) - } - - val data: Blob = js.native + def data: Blob = js.native } diff --git a/dom/src/main/scala/org/scalajs/dom/BlobEventInit.scala b/dom/src/main/scala/org/scalajs/dom/BlobEventInit.scala index a8d3bba3..8172e518 100644 --- a/dom/src/main/scala/org/scalajs/dom/BlobEventInit.scala +++ b/dom/src/main/scala/org/scalajs/dom/BlobEventInit.scala @@ -4,5 +4,5 @@ import scala.scalajs.js @js.native trait BlobEventInit extends EventInit { - var data: js.UndefOr[Blob] + var data: Blob }