Skip to content

onDownloadStart

abstract fun onDownloadStart(handler: (url: String, userAgent: String, contentDisposition: String, mimeType: String, contentLength: Long) -> Boolean)

Offers handler each download the page starts, with DownloadListener's arguments (an unknown disposition or MIME type is empty), before the onDownload prop and the core's opening it externally.

Return true to take it: neither of those gets it then. The hooks that are on are offered it in the order they attached (registration order, then those attached later), and the first that takes it ends the round.