Skip to content

Commit 9dabc3a

Browse files
committed
FileOptions changed to adhere to the spec and put in its own file
1 parent 6a010e3 commit 9dabc3a

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

dom/src/main/scala/org/scalajs/dom/File.scala

+2-8
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import scala.scalajs.js.annotation._
1919
*/
2020
@js.native
2121
@JSGlobal
22-
abstract class File(bits: js.Iterable[Any], name: String, options: FileOptions) extends Blob {
22+
class File(bits: js.Iterable[Any], name: String, options: FilePropertyBag) extends Blob {
2323

2424
/** The File.lastModified read-only property provides the last modified date of the file as the number of milliseconds
2525
* since the Unix epoch (January 1, 1970 at midnight). Files without a known last modified date return the current
@@ -34,10 +34,4 @@ abstract class File(bits: js.Iterable[Any], name: String, options: FileOptions)
3434
* A string containing the path of the file relative to the ancestor directory the user selected.
3535
*/
3636
def webkitRelativePath: String = js.native
37-
}
38-
39-
/** An options object containing optional attributes for the file. */
40-
trait FileOptions extends js.Object {
41-
var `type`: js.UndefOr[String] = js.undefined
42-
var lastModified: js.UndefOr[Int] = js.undefined
43-
}
37+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package org.scalajs.dom
2+
3+
import scala.scalajs.js
4+
5+
/** An options object containing optional attributes for the file. */
6+
trait FilePropertyBag extends BlobPropertyBag {
7+
var lastModified: js.UndefOr[Int] = js.undefined
8+
}

0 commit comments

Comments
 (0)