Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
 void webView_JavascriptRequest(object sender, JavascriptRequestEventArgs e)
 {
     Console.WriteLine(e.Request);
 }