readyState property
Contains a constant indicating the current state of the FileReader or MSStreamReader object.
![]() |
Syntax
var State = object.readyState;
Property values
Type: Number
The state of the FileReader or MSStreamReader object.
Remarks
When anMSStreamReader object is created, the readyState is set to EMPTY. When there is a call to a read method, the state is set to LOADING. If readyState is set to DONE, it means that read operation has completed.
The FileReader or MSStreamReader object can be in one of three states.
| Constant | Value | Description |
|---|---|---|
| EMPTY | 0 | The FileReader or MSStreamReader object has been constructed, and there are no pending reads. This is the default state of a newly created FileReader object, until one of the read methods has been called on it. |
| LOADING | 1 | One of the read methods is being processed, and no error has occurred during the read. |
| DONE | 2 | The read operation has completed. The entire File, Blob, or MSStream has been read into memory, a file error occurred during read, or the read was aborted using the abort method. |
See also
Show:
