Skip to content

ElectronDownloadItem.on('done') method

ElectronDownloadItem › on(‘done’)

Unofficial

Registers a listener for the done event, emitted when the download reaches a terminal state.

Signature:

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

Parameters:

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

Returns: thisThis download item instance.