Blob extension type
The Blob
object represents a blob, which is a file-like object of
immutable, raw data; they can be read as text or binary data, or converted
into a ReadableStream so its methods can be used for processing the data.
Blobs can represent data that isn't necessarily in a JavaScript-native
format. The File interface is based on Blob
, inheriting blob
functionality and expanding it to support files on the user's system.
Constructors
-
Blob([JSArray<
BlobPart> blobParts, BlobPropertyBag options]) -
factory
Properties
Methods
-
arrayBuffer(
) → JSPromise< JSArrayBuffer> -
The
arrayBuffer()
method of the Blob interface returns aPromise
that resolves with the contents of the blob as binary data contained in anArrayBuffer
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
slice(
[int start, int end, String contentType]) → Blob -
The
slice()
method of the Blob interface creates and returns a newBlob
object which contains data from a subset of the blob on which it's called. -
stream(
) → ReadableStream -
The
stream()
method of the Blob interface returns a ReadableStream which upon reading returns the data contained within theBlob
. -
text(
) → JSPromise< JSString> -
The
text()
method of the Blob interface returns aPromise
that resolves with a string containing the contents of the blob, interpreted as UTF-8. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited