No more Navigating event in WebView2 #4015
Replies: 4 comments
-
Thank you,CheersStephen ***@***.*** 509172On 24 Jan 2023, at 18:52, Patrick Brosset ***@***.***> wrote:
This is was originally posted by @stephen56 here MicrosoftDocs/edge-developer#2415
I'm re-posting (and paraphrasing) it here as I think it makes more sense on this repo:
Problem: The old WebBrowser had a navigating event which could intercept clicked links. Now clicked links just open new instances of Edge instead.
Context: KML is Keyhole markup language, used to place points on maps along with information about the points. It was made by an independent company back in the day, but I think it is maintained by Google now, essentially for use with Google Maps and Google Earth. Most mapping apps can open a .kml or .kmz (the zipped version of kml) files. My app is for airstrips in outback australia. Under the old WebBrowser plug-in, the blue underlined links could be captured by the Navigating event and then sent to a new WebBrowser window (ie within the app).
In WebView2 there is no Navigating event, only a "Navigation commenced" and a "Navigation completed". The clicks on the links in the KML information windows are not recognized by WebView2, they just open a new instance of Edge.
Is it possible to get this event back?
Thanks!
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I think you want |
Beta Was this translation helpful? Give feedback.
-
Is there any chance we could get the developers to get the KML info window links to fire the "Navigation Starting" event. My web app has information about airstrips in Australia. When the app loads, a kml file is fetched to display the markers on Maps. When a marker is clicked, an information window pops up. Then the link is in the info window is clicked it is supposed to fire up a pop up for with a second instance of webview2. After that I can use "webmessagereceived" to run some useful code The problem is that the link does not fire the "Navigation Commenced" event. So it is not possible to trap the event (using e.cancel = True). What happens is that a generic looking Edge Browser fires up. Historical note: it used to work fine in the old ie web browser. The old "Navigating" event used to fire and the code could be trapped using e.cancel = True. I have had this App since 2008 using the the old ie web browser. With the new Webbrowser2, my App has lost much of its functionality. Hope you can help. |
Beta Was this translation helpful? Give feedback.
-
I have attached a compressed kml for you to have a play with. Please rename it as .kml for it to open in maps or GE or similar. Cheers. |
Beta Was this translation helpful? Give feedback.
-
This is was originally posted by @stephen56 here MicrosoftDocs/edge-developer#2415
I'm re-posting (and paraphrasing) it here as I think it makes more sense on this repo:
Problem: The old WebBrowser had a
navigating
event which could intercept clicked links. Now clicked links just open new instances of Edge instead.Context: KML is Keyhole markup language, used to place points on maps along with information about the points. It was made by an independent company back in the day, but I think it is maintained by Google now, essentially for use with Google Maps and Google Earth. Most mapping apps can open a .kml or .kmz (the zipped version of kml) files. My app is for airstrips in outback australia. Under the old WebBrowser plug-in, the blue underlined links could be captured by the
Navigating
event and then sent to a new WebBrowser window (ie within the app).In WebView2 there is no
Navigating
event, only a "Navigation commenced" and a "Navigation completed". The clicks on the links in the KML information windows are not recognized by WebView2, they just open a new instance of Edge.Is it possible to get this event back?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions