ElectronDownloadItem.on('done') method
ElectronDownloadItem › on(‘done’)
Unofficial
Registers a listener for thedone event, emitted when the download reaches a terminal state. Signature:
on(event: "done", listener: (event: ElectronEvent, state: "cancelled" | "completed" | "interrupted") => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| event | "done" | The event name. |
| listener | (event: ElectronEvent, state: "cancelled" | "completed" | "interrupted") => void | Called with the terminal state of the download. |
Returns: this — This download item instance.