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:

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: thisThis download item instance.