HTML of the page is
<html>
<head>
<title>This is Title</title>
</head>
<body>
<button value="Hello World" onclick="test()" style="width: 171px; height: 77px"></button>
</body>
</html>
<script>
function test() {
window.close();
}
</script>
WPF code is
BrowserWindow1.Navigate(TextBox1.Text)
When I click on the button on the browser. Browser control gives me this message
The web page you are viewing is trying to close the tab. Do you want to close this tab?
I want to handle this thing before prompting this message and after prompting this message and thus override the default functionality of browser control with mine functionality.