- Code: Select all
namespace Xilium.CefGlue.Client
{
class WebRequestHandler : CefRequestHandler
{
protected override CefReturnValue OnBeforeResourceLoad(CefBrowser browser, CefFrame frame, CefRequest request, CefRequestCallback callback)
{
Console.WriteLine("Cancel all");
return CefReturnValue.Cancel;// .Continue;
}
}
I expect that it will write "Cancel all" to console and cancel loading all pages, but it is not. Do I need more actions? Is there some demo? (I Ctrl+F-ed "CefRequestHandler" through all solution and found it in CefGlue.demo, but there are no more instances of WebRequestHandler, what I missed?).
Before cefglue I used cefpython bindings, in which browser object contains browser.SetClientHandler method, what alternative is in CefGlue? Thanks.