Preventing Browser Navigation
David Bovill
david.bovill at gmail.com
Tue Nov 28 15:56:49 EST 2023
So you should be able to prevent navigation on iOS using:
on browserLoadRequest pURL, pType
-- iOS only
end browserLoadRequest
But that does not work with the browser widget. Also I don;t seem to be
able to respond to browser html / javascript events that seek to open a url
in a new browser tab. This means that displaying web sites that use this
functionality is not possible. Or is there a way? The following do not
respond to links in the html that open such tabs - in fact they don't seem
to be triggered:
on browserFrameDocumentLoadFailed pUrl, pError
breakpoint
end browserFrameDocumentLoadFailed
on browserFrameDocumentLoadBegin pUrl
breakpoint
end browserFrameDocumentLoadBegin
on browserDocumentLoadFailed pUrl, pError
breakpoint
end browserDocumentLoadFailed
on browserUnhandledLoadRequest pUrl
breakpoint
end browserUnhandledLoadRequest
These work, but are not useful for the purpose of blocking a load, or
responding to requests for open in a new tab events:
on browserNavigateBegin sUrl
breakpoint
end browserNavigateBegin
on browserDocumentLoadBegin pUrl
breakpoint
end browserDocumentLoadBegin
On Tue, 28 Nov 2023 at 17:43, David Bovill <david.bovill at gmail.com> wrote:
> Is there a way to prevent the desktop browser widget from navigating to a
> new url by blocking a message? I seem to remember it was possible but
> intercepting: browserNavigateBegin, browserDocumentLoadBegin messages do
> not prevent the navigation. I wish to process a url dropped on the page
> rather than navigate to it.
>
More information about the use-livecode
mailing list