Skip to main content

browserDownloadRequest

Type​

message

Summary​

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

Syntax​

browserDownloadRequest <pInstanceId>, <pUrl>
XBrowser_DownloadRequest <pUrl>, <pInstanceId>

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.

Parameters​

NameTypeDescription

pInstanceId

The integer identifier of the browser object

pUrl

The url of the resource about to be downloaded

Examples​

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

function: revBrowserOpen

glossary: function, browserCancel

message: browserDocumentCompleteFrame, queryRecordChanged, browserBeforeNavigate, browserBeforeNavigateFrame, browserDocumentComplete

Compatibility and Support​

Introduced

LiveCode 2.8.1

OS

mac

windows

Platforms

desktop

Thank you for your feedback!

Was this page helpful?