Name: browserDownloadRequest

Synonyms: xbrowser_downloadrequest

Type: message

Syntax: browserDownloadRequest <pInstanceId>, <pUrl>

Syntax: XBrowser_DownloadRequest <pUrl>, <pInstanceId>

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

Introduced: 2.8.1

OS: mac, windows

Platforms: desktop

Security: network

Example:
on browserDownloadRequest pInstanceId, pUrl
  if urlForbidden(pUrl) then
    global browserCancel
    put true into browserCancel
  end if
end browserDownloadRequest

Parameters:
pInstanceId:
The integer identifier of the browser object

pUrl:
The url of the resource about to be downloaded

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.

References: revBrowserOpen (function), function (glossary),
browserCancel (glossary), browserDocumentCompleteFrame (message),
queryRecordChanged (message), browserBeforeNavigate (message),
browserBeforeNavigateFrame (message), browserDocumentComplete (message)

