class Blob extends Object with StObject
- Annotations
- @JSType() @JSImport("buffer", "Blob") @native()
- Alphabetic
- By Inheritance
- Blob
- StObject
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Blob(sources: Array[|[BinaryLike, Blob]], options: BlobOptions)
- new Blob(sources: Array[|[BinaryLike, Blob]])
Creates a new
Blob
object containing a concatenation of the given sources.Creates a new
Blob
object containing a concatenation of the given sources.{ArrayBuffer}, {TypedArray}, {DataView}, and {Buffer} sources are copied into the 'Blob' and can therefore be safely modified after the 'Blob' is created.
String sources are also copied into the
Blob
.
Value Members
- def arrayBuffer(): Promise[ArrayBuffer]
Returns a promise that fulfills with an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) containing a copy of the
Blob
data.Returns a promise that fulfills with an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) containing a copy of the
Blob
data.- Since
v15.7.0
- def hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
- def isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
- def propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
- val size: Double
The total size of the
Blob
in bytes.The total size of the
Blob
in bytes.- Since
v15.7.0
- def slice(start: Unit, end: Unit, type: String): Blob
- def slice(start: Unit, end: Double, type: String): Blob
- def slice(start: Unit, end: Double): Blob
- def slice(start: Double, end: Unit, type: String): Blob
- def slice(start: Double, end: Double, type: String): Blob
- def slice(start: Double, end: Double): Blob
- def slice(start: Double): Blob
- def slice(): Blob
Creates and returns a new
Blob
containing a subset of thisBlob
objects data.Creates and returns a new
Blob
containing a subset of thisBlob
objects data. The originalBlob
is not altered.- Since
v15.7.0
- def stream(): Any
Returns a new
ReadableStream
that allows the content of theBlob
to be read.Returns a new
ReadableStream
that allows the content of theBlob
to be read.- Since
v16.7.0
- def text(): Promise[String]
Returns a promise that fulfills with the contents of the
Blob
decoded as a UTF-8 string.Returns a promise that fulfills with the contents of the
Blob
decoded as a UTF-8 string.- Since
v15.7.0
- def toLocaleString(): String
- Definition Classes
- Object
- val type: String
The content-type of the
Blob
.The content-type of the
Blob
.- Since
v15.7.0
- def valueOf(): Any
- Definition Classes
- Object