browserDownloadRequest

Typemessage
DictionaryLCS
LibraryLiveCode Script
Syntax
browserDownloadRequest <pInstanceId>, <pUrl>
XBrowser_DownloadRequest <pUrl>, <pInstanceId>
Synonymsxbrowser_downloadrequest
Summary

Sent when a download has been requested in a browser object.

Introduced2.8.1
OSmac, windows
Platformsdesktop
Parameters
NameTypeDescription
pInstanceId

The integer identifier of the browser object

pUrl

The url of the resource about to be downloaded

Example
on browserDownloadRequest pInstanceId, pUrl
  if urlForbidden(pUrl) then
    global browserCancel
    put true into browserCancel
  end if
end browserDownloadRequest
RelatedGlossary: function, browserCancel
Message: browserDocumentCompleteFrame, queryRecordChanged, browserBeforeNavigate, browserBeforeNavigateFrame, browserDocumentComplete
Function: revBrowserOpen
Securitynetwork
Description

The browserDownloadRequest message is sent to the current card of stack containing a browser object when a url has been requested as a download.

On Windows, if the browserCancel global is set to false on exit from the callback, the browser proceeds to download the file.

On OS X, the callback is a notification only and downloading should be performed by the host application.

Note: For general information on using the browser library, see the notes in the revBrowserOpen function reference.