Closed 9ParsonsB closed 3 years ago
In the upcoming V2 there is a Closing event raised for the native window (which can even prevent the window from closing). There is also the built-in browser event for closing the webview control that can be used in JavaScript. Can you explain your scenario? Do you want to write a JavaScript handler or a C# handler? Thanks.
Hey, Thanks for your reply, love the project!
The Scenario is a full screen kiosk-style app that shows an animated webpage while it is doing some work in the background - in C#. Once this is done, the application closes the window and runs another application.
We are also looking at using photino for the aforementioned other application, but then we would need to be able to close the current window from javascript. This works if you run most browsers (as per spec) with an url as a parameter and dont navigate away.
This feature would also help circumvent the issues I am having as a result of tryphotino/photino.NET#52
This should be fixed with the release of Photino v2. Please give it a try and let us know if the problem remains.
@ottodobretsberger Where can I get v2? I dont see a git tag?
The V2 NuGet packages are available for use from NuGet.org. For source code, pull the latest 'master' branch in GitHub. We did not add tags.
In CoreWebView2 you are able to listen to event
CoreWebView2.WindowCloseRequested
for whenwindow.close()
is called in javascript.As per the dom-window-close spec this function is allowed:
Could this functionality please be implemented?