This interface provides methods to monitor the asynchronous writing of blobs to disk using progress events [PROGRESS-EVENTS] and event handler attributes.
This interface is specified to be used within the context of the global object (Window [HTML5]) and within Web Workers (WorkerUtils [WEBWORKERS-ED]).
public DONE:number
The entire Blob has been written to the file, an error occurred during the write, or the write was aborted using abort(). The FileSaver is no longer writing the blob.
readonly
public INIT:number
The blob is being written.
readonly
public WRITING:number
The object has been constructed, but there is no pending write.
readonly
public error:DOMError
The last error that occurred on the FileSaver.
readonly
public onabort:Function
Handler for abort events.
public onerror:Function
Handler for error events.
public onprogress:Function
Handler for progress events.
public onwrite:Function
Handler for write events.
public onwriteend:Function
Handler for writeend events.
public onwritestart:Function
Handler for writestart events
public readyState:number
The FileSaver object can be in one of 3 states. The readyState attribute, on getting, must return the current state, which must be one of the following values:
INIT
WRITING
DONE
readonly
public abort()
When the abort method is called, user agents must run the steps below:
If readyState == DONE or readyState == INIT, terminate this overall series of steps without doing anything else.
Set readyState to DONE.
If there are any tasks from the object's FileSaver task source in one of the task queues, then remove those tasks.
Terminate the write algorithm being processed.
Set the error attribute to a DOMError object of type "AbortError".
Fire a progress event called abort
Fire a progress event called writeend
Terminate this algorithm.
public addEventListener(type: string, listener: EventListener, useCapture?: boolean)
Parameters
type: string
listener: EventListener
useCapture?: booleanoptional
public dispatchEvent(evt: Event): boolean
Parameters
evt: Event
Returns
boolean
public removeEventListener(type: string, listener: EventListener, useCapture?: boolean)