Files
cefsharp/CefSharp.Example/JsDialogHandler.cs
T
amaitland 62292e4211 NPAPI Plugin methods removed from API
cef_runnable.h has been removed
Update IJsDialogHandler.OnJSDialog - acceptLang removed from API
2016-05-30 07:57:48 +10:00

34 lines
1.2 KiB
C#

// Copyright © 2010-2016 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
{
public bool OnJSDialog(IWebBrowser browserControl, IBrowser browser, string originUrl, 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;
}
public void OnResetDialogState(IWebBrowser browserControl, IBrowser browser)
{
}
public void OnDialogClosed(IWebBrowser browserControl, IBrowser browser)
{
}
}
}