Hi guys,
I have a window that uses the new webBrowser control, with a simple web page from my company.
This control is ok, but I'd like to see if you can help me do one or two things:
1. When the user clicks on a link, I'd like to open the default web browser, instead of inside the current control. This is the main issue.
2. Would it be possible to add, maybe a tag on the hyperlink, so that I can decide if I want to open the clicked link on the control or on the default browser? This is a plus, not mandatory.
I used the code below to open the web browser, on my addressChange event, it worked but it also navigates the control. I guess I could navigate back, but that would not be a great way to do things. I couldn't find, like a "return 1" to stop navigating.
inet inet_base
GetContextService("Internet", inet_base)
inet_base.HyperlinkToUrl(newurl)
Thanks a lot
Yes, I've seen this requirement before as well and I think, that there was an enhancement request around this too.
I think that we need the internal web browser to support tab pages. Then these secondary urls and / or pop-ups might be then better supported (my guess).
Regards... Chris
Thanks for the reply.
I think both would be very good to have in the future, however some companies only allow certain browsers to browse the internet. For example, we only have local websites in use and to access a URL the installed browser must be used. It would be very desirable if additionally the NewWindowRequested event of webview2 is available as an event in the webbrowser control.
Regards Tobi
Please open an enhancement request support ticket for the support of the "NewWindowRequested" event in the WebView2 web browser engine.
Regards.... Chris