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.bov...@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.
>
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to