Blob

@JSImport("node:buffer", "Blob") @native @JSType class Blob extends Blob with _TransferListItem
class Blob
trait StObject
class Object
trait Any
class Object
trait Matchable
class Any

Value members

Constructors

def this(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.

def this(sources: Array[BinaryLike | Blob], options: BlobOptions)

Inherited methods

def arrayBuffer(): Promise[ArrayBuffer]
Inherited from
Blob
def hasOwnProperty(v: String): Boolean
Inherited from
Object
def isPrototypeOf(v: Object): Boolean
Inherited from
Object
def propertyIsEnumerable(v: String): Boolean
Inherited from
Object
def slice(start: Unit, end: Unit, `type`: String): Blob
Inherited from
Blob
def slice(start: Unit, end: Double, `type`: String): Blob
Inherited from
Blob
def slice(start: Unit, end: Double): Blob
Inherited from
Blob
def slice(start: Double, end: Unit, `type`: String): Blob
Inherited from
Blob
def slice(start: Double, end: Double, `type`: String): Blob
Inherited from
Blob
def slice(start: Double, end: Double): Blob
Inherited from
Blob
def slice(start: Double): Blob
Inherited from
Blob
def slice(): Blob
Value Params
end

The ending index.

start

The starting index.

type

The content-type for the new Blob

Inherited from
Blob
def text(): Promise[String]

Returns a promise that resolves the contents of the Blob decoded as a UTF-8 string.

Returns a promise that resolves the contents of the Blob decoded as a UTF-8 string.

Inherited from
Blob
def toLocaleString(): String
Inherited from
Object
def valueOf(): Any
Inherited from
Object

Inherited fields

val `type`: String

The content-type of the Blob.

The content-type of the Blob.

Inherited from
Blob
val size: Double

Returns a promise that fulfills with an {ArrayBuffer} containing a copy of the Blob data.

Returns a promise that fulfills with an {ArrayBuffer} containing a copy of the Blob data.

Inherited from
Blob