private void webControl_JavascriptRequest(object sender, JavascriptRequestEventArgs e) { // Synchronously called through OSMJIF. if (e.Request != JavascriptRequest.Minimize) { return; } // Will be true if called from the top window. We ignore // requests from frames. if (!e.RequestToken) { return; } // Minimize the window. this.WindowState = System.Windows.WindowState.Minimized; // JavascriptRequest is called synchronously. Set Handled to true // to let JavaScript callers know that we accepted the request. e.Handled = true; }
void webView_JavascriptRequest(object sender, JavascriptRequestEventArgs e) { Console.WriteLine(e.Request); }