A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/apis/file/Blob/close below:

close ยท WebPlatform Docs

close Summary

Releases the file lock for the associated file resource or frees the memory for the Blob object. After calling this method, performing addition operations on the Blob object fails and throws an exception.

Method of apis/file/Blobapis/file/Blob

Syntax
 Blob.close();
Return Value

No return value

Examples

This example creates a text blob object, reports its size, splits the blob object in half, reports that size, then closes the blob object.

<script>

var blobj = new Blob(["I scream, you scream, we <b>all</b> scream for ice cream!"], { "type" : "text/xml" });
alert("Blob size: " + blobj.size);

var blobjfirsthalf = blobj.slice(0, Math.round(blobj.size/2));
alert("Blob first half size: " + blobjfirsthalf.size);

blobj.close();
</script>
Related specifications
W3C File API Specification
W3C Working Draft
Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4