onBeforeDownload

abstract fun onBeforeDownload(browser: CefBrowser, downloadItem: CefDownloadItem, suggestedName: String, callback: CefBeforeDownloadCallback)

Called before a download begins. By default the download will be canceled. Execute callback either asynchronously or in this method to continue the download if desired.

Parameters

browser

The desired browser.

downloadItem

The item to be downloaded. Do not keep a reference to it outside this method.

suggestedName

is the suggested name for the download file.

callback

start the download by calling the Continue method