package js.html
extends EventTarget
Available on jsThe
FileReaderobject lets web applications asynchronously read the contents of files (or raw data buffers) stored on the user's computer, usingFileorBlobobjects to specify the file or data to read.Documentation FileReader by Mozilla Contributors, licensed under CC-BY-SA 2.5.
See:
new ()Throws:
null |
DOMError |
|---|
read only error:DOMErrorA DOMError representing the error that occurred while reading the file.
onabort:FunctionA handler for the abort event. This event is triggered each time the reading operation is aborted.
onerror:FunctionA handler for the error event. This event is triggered each time the reading operation encounter an error.
onload:FunctionA handler for the load event. This event is triggered each time the reading operation is successfully completed.
onloadend:FunctionA handler for the loadend event. This event is triggered each time the reading operation is completed (either in success or failure).
onloadstart:FunctionA handler for the loadstart event. This event is triggered each time the reading is starting.
onprogress:FunctionA handler for the progress event. This event is triggered while reading a Blob content.
read only readyState:IntA number indicating the state of the FileReader. This is one of the following:
EMPTY | 0 | No data has been loaded yet. |
LOADING | 1 | Data is currently being loaded. |
DONE | 2 | The entire read request has been completed. |
read only result:DynamicThe file's contents. This property is only valid after the read operation is complete, and the format of the data depends on which of the methods was used to initiate the read operation.
abort ():VoidThrows:
null |
DOMError |
|---|
readAsArrayBuffer (blob:Blob):VoidThrows:
null |
DOMError |
|---|
readAsBinaryString (filedata:Blob):VoidThrows:
null |
DOMError |
|---|
readAsDataURL (blob:Blob):VoidThrows:
null |
DOMError |
|---|
readAsText (blob:Blob, label:String = ""):VoidThrows:
null |
DOMError |
|---|
static inline read only DONE:Int = 2 static inline read only EMPTY:Int = 0 static inline read only LOADING:Int = 1
© 2005–2018 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/FileReader.html