Page 1 of 1
NewWindowRequested
Posted: Wed Feb 23, 2022 8:52 pm
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?
Re: NewWindowRequested
Posted: Thu Feb 24, 2022 8:07 am
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