ElectronDownloadItem.once method
ElectronDownloadItem › once
Unofficial
Registers a one-time listener for thedone event.Signature:
once($event: "done", listener: ($event: ElectronEvent, state: "cancelled" | "completed" | "interrupted") => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "done" | |
| listener | ($event: ElectronEvent, state: "cancelled" | "completed" | "interrupted") => void | Called with the terminal state of the download. |
Returns: this — This download item instance.
Unofficial
Registers a one-time listener for theupdated event.Signature:
once($event: "updated", listener: ($event: ElectronEvent, state: "interrupted" | "progressing") => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "updated" | |
| listener | ($event: ElectronEvent, state: "interrupted" | "progressing") => void | Called with the current state of the download. |
Returns: this — This download item instance.