Skip to main content

Download manager API exposed on window.glue42gd.downloads

12 Methods

cancel()⚓︎

(id: string) => Promise<void>

Cancel a download item by ID

Parameters (1)

Name Type Required Description
id⚓︎ string x

clearDownloadList()⚓︎

() => Promise<void>

Clear the download list

getSavePath()⚓︎

(path: string) => Promise<void>

Get the save path for downloads

Parameters (1)

Name Type Required Description
path⚓︎ string x

getSavePathList()⚓︎

() => Promise<string[]>

Get the list of save paths for downloads

list()⚓︎

() => Promise<DownloadItem[]>

List all download items

onConfigurationChanged()⚓︎

(callback: (config: DownloadsConfiguration) => void) => () => void

Register a callback for download configuration changes

Parameters (1)

Name Type Required Description
callback⚓︎ (config: DownloadsConfiguration) => void x

onUpdate()⚓︎

(callback: (item: DownloadItem) => void) => () => void

Register a callback for download item updates

Parameters (1)

Name Type Required Description
callback⚓︎ (item: DownloadItem) => void x

pauseResume()⚓︎

(id: string) => Promise<void>

Pause or resume a download item by ID

Parameters (1)

Name Type Required Description
id⚓︎ string x

removeItem()⚓︎

(id: string) => Promise<void>

Remove a download item by ID

Parameters (1)

Name Type Required Description
id⚓︎ string x

setSavePath()⚓︎

(path: string) => Promise<void>

Set the save path for downloads

Parameters (1)

Name Type Required Description
path⚓︎ string x

showInFolder()⚓︎

(id: string) => Promise<void>

Show a download item in the folder

Parameters (1)

Name Type Required Description
id⚓︎ string x

showOpenDialog()⚓︎

Show an open dialog for downloads

Parameters (1)

Name Type Required Description
options⚓︎ OpenDialogOptions x