コード例 #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;
        }
コード例 #2
0
ファイル: FormLogs.cs プロジェクト: radtek/yiqixicai
 void webView_JavascriptRequest(object sender, JavascriptRequestEventArgs e)
 {
     Console.WriteLine(e.Request);
 }