I have a WebView in an UWP app. The page shows a popup window by calling window.open (https://www.w3schools.com/jsref/met_win_open.asp). Is there a way for me to make this open in the WebView?
Is there a way for me to make this open in the WebView?
The open() method creates a new secondary browser window. If you want the new page to open also inside the WebView means that you don't want to create a new secondary browser window but navigate to another page in current window.  
In that case, you could use  window.location instead of window.open. For example:
<html>
<head>
    <script type="text/javascript">
        function open_win() {
            //window.open("http://www.microsoft.com")
            window.location = "http://www.microsoft.com"
        }
    </script>
</head>
<body>
    <form>
        <input type=button value="navigate to" onclick="open_win()">
    </form>
</body>
</html>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With