mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
Exposed onprogress.
This commit is contained in:
parent
293145257c
commit
e9739882f4
@ -178,11 +178,19 @@ export class Transfer {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a listener that gets called whenever a new chunk of data is transferred.
|
||||
* @param {function} Listener that takes a progress event.
|
||||
*/
|
||||
onProgress(listener: (event: ProgressEvent) => any): void {
|
||||
this.ft.onprocess = listener;
|
||||
}
|
||||
|
||||
/**
|
||||
* Aborts an in-progress transfer. The onerror callback is passed a FileTransferError
|
||||
* object which has an error code of FileTransferError.ABORT_ERR.
|
||||
*/
|
||||
abort() {
|
||||
abort(): void {
|
||||
return this.ft.abort();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user