mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-05-10 21:07:06 +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
|
* Aborts an in-progress transfer. The onerror callback is passed a FileTransferError
|
||||||
* object which has an error code of FileTransferError.ABORT_ERR.
|
* object which has an error code of FileTransferError.ABORT_ERR.
|
||||||
*/
|
*/
|
||||||
abort() {
|
abort(): void {
|
||||||
return this.ft.abort();
|
return this.ft.abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user