Packages

class Blob extends Object with StObject

Annotations
@JSType() @JSImport("buffer", "Blob") @native()
Linear Supertypes
StObject, Object, Any, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Blob
  2. StObject
  3. Object
  4. Any
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Blob(sources: Array[|[BinaryLike, Blob]], options: BlobOptions)
  2. 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

  1. 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

  2. def hasOwnProperty(v: String): Boolean
    Definition Classes
    Object
  3. def isPrototypeOf(v: Object): Boolean
    Definition Classes
    Object
  4. def propertyIsEnumerable(v: String): Boolean
    Definition Classes
    Object
  5. val size: Double

    The total size of the Blob in bytes.

    The total size of the Blob in bytes.

    Since

    v15.7.0

  6. def slice(start: Unit, end: Unit, type: String): Blob
  7. def slice(start: Unit, end: Double, type: String): Blob
  8. def slice(start: Unit, end: Double): Blob
  9. def slice(start: Double, end: Unit, type: String): Blob
  10. def slice(start: Double, end: Double, type: String): Blob
  11. def slice(start: Double, end: Double): Blob
  12. def slice(start: Double): Blob
  13. def slice(): Blob

    Creates and returns a new Blob containing a subset of this Blob objects data.

    Creates and returns a new Blob containing a subset of this Blob objects data. The original Blob is not altered.

    Since

    v15.7.0

  14. def stream(): Any

    Returns a new ReadableStream that allows the content of the Blob to be read.

    Returns a new ReadableStream that allows the content of the Blob to be read.

    Since

    v16.7.0

  15. 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

  16. def toLocaleString(): String
    Definition Classes
    Object
  17. val type: String

    The content-type of the Blob.

    The content-type of the Blob.

    Since

    v15.7.0

  18. def valueOf(): Any
    Definition Classes
    Object