-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #721 from zetashift/fix/file-api#601
Fixup `Blob` and `File` APIs
- Loading branch information
Showing
9 changed files
with
78 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package org.scalajs.dom | ||
|
||
import scala.scalajs.js | ||
|
||
/** | ||
* Endings enum for [[https://w3c.github.io/FileAPI/#enumdef-endingtype]] | ||
* If set to "native", line endings will be converted to native in any USVString elements in blobParts | ||
*/ | ||
@js.native | ||
sealed trait EndingType extends js.Any | ||
|
||
object EndingType { | ||
val transparent: EndingType = "transparent".asInstanceOf[EndingType] | ||
val native: EndingType = "native".asInstanceOf[EndingType] | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.scalajs.dom | ||
|
||
import scala.scalajs.js | ||
|
||
/** | ||
* Endings enum for [[https://w3c.github.io/FileAPI/#enumdef-endingtype]] | ||
* If set to "native", line endings will be converted to native in any USVString elements in blobParts | ||
*/ | ||
opaque type EndingType <: String = String | ||
|
||
object EndingType { | ||
val transparent: EndingType = "transparent" | ||
val native: EndingType = "native" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package org.scalajs.dom | ||
|
||
import scala.scalajs.js | ||
|
||
/** An options object containing optional attributes for the file. */ | ||
trait FilePropertyBag extends BlobPropertyBag { | ||
var lastModified: js.UndefOr[Double] = js.undefined | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters