Package-level declarations

Types

Link copied to clipboard
open class Blob(blobParts: ReadonlyArray<BlobPart> = definedExternally, options: BlobPropertyBag = definedExternally) : ImageBitmapSource, Serializable

The Blob interface 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.

Link copied to clipboard
typealias BlobPart = JsAny
Link copied to clipboard
interface BlobPropertyBag
Link copied to clipboard
sealed interface EndingType

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
inline suspend fun Blob.arrayBuffer(): ArrayBuffer

The arrayBuffer() method of the Blob interface returns a Promise that resolves with the contents of the blob as binary data contained in an ArrayBuffer.

Link copied to clipboard
suspend fun Blob.byteArray(): ByteArray
Link copied to clipboard
inline suspend fun Blob.bytes(): Uint8Array<ArrayBuffer>

The bytes() method of the Blob interface returns a Promise that resolves with a Uint8Array containing the contents of the blob as an array of bytes.

Link copied to clipboard
inline suspend fun Blob.text(): String

The text() method of the Blob interface returns a Promise that resolves with a string containing the contents of the blob, interpreted as UTF-8.