Rank: Advanced Member Groups: Member
Joined: 5/15/2017 Posts: 48
|
One of our customers have JavaScript for opening and closing popups (sample below). When a popup is created we handle the WebView.NewWindow event and create a WPF popup window. Now from the JavaScript if this popup is closed, we need a way to close the popup. We couldn't find any event from WebView for popup close. Is there any way to do this? If not, can you add the capability to support this scenario?
Sample JavaScript: <!doctype html> <html> <head><title>Test</title></head> <body>
<input type="button" value="Popup" onclick="Open()" /> <input type="button" value="close" onclick="Close()" />
<script language="javascript"> function Open() { rtwin = window.open(); rtwin.document.write("<p>This is for Test</p>") } function Close() { rtwin.close(); } </script>
</body> </html>
|
Rank: Advanced Member Groups: Member
Joined: 5/15/2017 Posts: 48
|
We figured out how to do this. We subscribe the WebView closed event on the WebView corresponding to the popup window.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,258
|
Great. Glad to hear that you got it working!
|