WebKit2.Download.prototype.set_destination
function set_destination(uri: String): void { // Gjs wrapper for webkit_download_set_destination() }
Sets the URI to which the downloaded file will be written. This method should be called before the download transfer starts or it will not have any effect on the ongoing download operation. To set the destination using the filename suggested by the server connect to WebKit2.Download::decide-destination signal and call WebKit2.Download.prototype.set_destination. If you want to set a fixed destination URI that doesn't depend on the suggested filename you can connect to notify::response signal and call WebKit2.Download.prototype.set_destination. If WebKit2.Download::decide-destination signal is not handled and destination URI is not set when the download tranfer starts, the file will be saved with the filename suggested by the server in %G_USER_DIRECTORY_DOWNLOAD directory.
- uri
the destination URI