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/FileReader/readAsArrayBuffer below:

readAsArrayBuffer · WebPlatform Docs

readAsArrayBuffer Summary

Returns partial Blob data representing the number of bytes currently loaded (as a fraction of the total), as an ArrayBuffer object, a fixed-length binary data buffer.

Method of apis/file/FileReaderapis/file/FileReader

Syntax
var  = FileReader.readAsArrayBuffer(blob);
Parameters blob
Data-type
Blob
Return Value

Returns an object of type DOM NodeDOM Node

Type: HRESULT

This method can return one of these values.

S_OK

Examples
var reader = new FileReader();

reader.onload = function(e) {
  var arrayBuffer = reader.result;
}

reader.readAsArrayBuffer(file);
Notes

This method asynchronously starts reading the contents of the specified File. When the read operation is finished, readyState will become DONE and the onloadend event handler (that is, callback), if present, will be invoked. At that time, the result attribute contains an array buffer object representing the file’s data.

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