Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

NewWindowRequested

Post Reply
mddmx
Posts: 14
Joined: Fri Dec 13, 2019 2:42 pm

NewWindowRequested

Post by mddmx »

Once again, very nice job on WebView4Delphi!

Can I use NewWindowRequested to redirect a hyperlink click to the default browser on the system?
User avatar
salvadordf
Posts: 4620
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: NewWindowRequested

Post by salvadordf »

Hi,

Yes, you can.

Use that event with this code :
https://github.com/salvadordf/WebView4Delphi/blob/270dcaaa12d9336bea8ce0cbe627c038db20cc2c/demos/Delphi_VCL/KioskBrowser/uKioskBrowser.pas#L128

And use TempArgs.URI to open the default web browser like this :
https://stackoverflow.com/questions/10154543/opening-webpage-in-default-browser-with-double-quotes-inside-url
Post Reply