SIGN IN SIGN UP
cefsharp / CefSharp UNCLAIMED

.NET (WPF and Windows Forms) bindings for the Chromium Embedded Framework

0 0 1 C#
2015-08-03 10:41:29 +10:00
// Copyright © 2010-2015 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
namespace CefSharp.Example
{
public class JsDialogHandler : IJsDialogHandler
{
2015-06-08 22:48:29 -04:00
public bool OnJSDialog(IWebBrowser browserControl, IBrowser browser, string originUrl, string acceptLang, CefJsDialogType dialogType, string messageText, string defaultPromptText, IJsDialogCallback callback, ref bool suppressMessage)
{
return false;
}
public bool OnJSBeforeUnload(IWebBrowser browserControl, IBrowser browser, string message, bool isReload, IJsDialogCallback callback)
{
//NOTE: No need to execute the callback if you return false
// callback.Continue(true);
//NOTE: Returning false will trigger the default behaviour, you need to return true to handle yourself.
return false;
}
}
}