Web APIs
Blob
Constructs immutable bytes from supplied parts with optional type metadata.
Formal Syntax & Structure
javascript syntaxjavascript
new Blob(parts, options)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| parts | array | Strings, binary data or Blob parts. |
| options | object | Optional metadata and line-ending settings. |
Return Value
Blob
Constructs immutable bytes from supplied parts with optional type metadata.
Working Example
Example Snippetjavascript
(async () => {const b=new Blob(["é"],{type:"text/plain"});console.log(b.size,b.type);})()