browserBeforeNavigateFrame

Typemessage
DictionaryLCS
LibraryLiveCode Script
Syntax
browserBeforeNavigateFrame <pInstanceId>, <pUrl>
XBrowser_BeforeNavigateFrame <pUrl>, <pInstanceId>
Synonymsxbrowser_beforenavigateframe
Summary

Sent when a browser is about to navigate to a new url in a frame

Introduced2.8.1
OSmac, windows
Platformsdesktop
Parameters
NameTypeDescription
pInstanceID

The integer identifier of the browser object

pUrl

The new url that is about to be navigated to in the frame

Example
on browserBeforeNavigateFrame pInstanceId, pUrl
  if not browserFrameNavAllowed() then
    global browserCancel
    put true into browserCancel
  end if
end browserBeforeNavigateFrame
RelatedGlossary: function, browserCancel, message
Message: browserBeforeNavigate, browserDownloadRequest, browserNavigateCompleteFrame
Function: revBrowserOpen
Securitynetwork
Description

The browserBeforeNavigateFrame message is sent to the current card of a stack containg a browser object when the browser object is about to navigate to a new url in a frame. i.e. a change in the url in the target browser has been requested but not yet actioned.

If the target is the main frame of the browser then the browserBeforeNavigate message is sent instead.

To prevent the navigation occuring, set the global variable browserCancel to true

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