Skip to content

ElectronDownloadItem.once method

ElectronDownloadItem › once

Unofficial

Registers a one-time listener for the done event.

Signature:

once($event: "done", listener: ($event: ElectronEvent, state: "cancelled" | "completed" | "interrupted") => void): this

Parameters:

ParameterTypeDescription
$event"done"
listener($event: ElectronEvent, state: "cancelled" | "completed" | "interrupted") => voidCalled with the terminal state of the download.

Returns: this — This download item instance.


Unofficial

Registers a one-time listener for the updated event.

Signature:

once($event: "updated", listener: ($event: ElectronEvent, state: "interrupted" | "progressing") => void): this

Parameters:

ParameterTypeDescription
$event"updated"
listener($event: ElectronEvent, state: "interrupted" | "progressing") => voidCalled with the current state of the download.

Returns: this — This download item instance.