FAQ Database Discussion Community

Can't add CefSharp to my toolbox

I'm currently trying to add CefSharp to my tools so that I can drag and drop a webbrowser onto my form. I installed CefSharp via NuGet in Visual Studio 2013. I then right-clicked the tools section and selected "Choose Items" In the ".NET Framework Components" I selected browse and click...

RegisterJsObject CefSharp not work

I have that problem whith CefSharp and js communication. This is my structure. In my MainWindow.xaml.cs I have: chromium = new CefSharp.Wpf.ChromiumWebBrowser(); chromium.RegisterJsObject("jsInterface", new jsMapInterface()); where jsMapInterface is a public class with its methods. In my html/js folder, I call a C# method with: window.jsInterface.myTest(); //jsInterface.myTest(); //I have tested twice...

Run Cefsharp as Chrome

Is it possible to use CefSharp as 'Chrome'? I know, it is a kind of Chrome, but webpages doesn't see CefSharp as Chrome. The story: I want to embed WhatsApp Web with CefSharp, but Whatsapp says: Only Chrome supported. Are there any possibilities to 'fake' Chrome?

How to save cookies in CefSharp

I'm new to CefSharp. Last week i build my first little program with CefSharp in C#. It's a split screen program. In one split i loaded Tweetdeck. It works fine, but Tweetdeck doesn't store cookies. Every time i start the program, i must login. Is there a way to save...

How to save cookies in CefSharp WPF

I need WPF CefSharp ChromiumWebBrowser to save cookies. I've found similar question but for Winforms here. The problem is that Cef.Initialize() is called in ChromiumWebBrowser so I don't have access to it. How this can be done in wpf cef sharp?...

CefSharp 3 always failing Cef.Initialize()

I recently tried making the jump from CefSharp 1.25.7 to the most recent build (39.0.0-pre02). I got the files through NuGet but I copied them into my project separately since they have to be included in our repository to share with other developers. I believe I got all of the...

Playing Flash video using cefsharp or Geckofx

I'm putting together a simple winforms app for playing videos from the web for my kids. I've explored two options so far but I'm having problems with both of them: cefsharp: Playing videos wasn't a problem, but it would not persist cookies (even with the CachePath set), so I would...

CefSharp1: Custom HTTP SchemeHandler with fallback to default

I'm writing an application where I need to override both the HTTP and HTTPS schemes with my own handler. However, I need to let any requests that are not handled fallback to the default handler and be processed normally. I thought I could just return "false" from ProcessRequestAsync but that...

How to restrict CefSharp Browser to given domain

I would like to prevent my application to display web pages other than from a certain domain (i.e. example.com). My initial idea was to check the request URL in the OnBeforeBrowse event handler. public bool OnBeforeBrowse(IWebBrowser browser, IRequest request, bool isRedirect) { return !IsPageAllowed(request.Url); } This looks doable, except for...

CEFSharp RegisterJsObject reference error

I know this question has been beaten to death with this library but despite the examples available, I'm having a hard time getting Javascript bindings to work with WPF. I'm using CefSharp.Common 37.0.0 The Javascript error that I'm getting is: Uncaught ReferenceError: myClass is not defined Below, you will find...

CefSharp doesn't run in WIndows 7

I have been struggle to run my C# winforms CefSharp on Windows 7. Everytime that I try to run it I have a error and the app doesn't open. I tryed to run this example on client: https://github.com/cefsharp/CefSharp.MinimalExample Here some things of what I understood so far: Windows 7 with...

CEFSharp Winforms display a loadin message while the website loads?

Am using Cefsharp 39.0.0 to load a webpage inside a winform. Now while the page loads the form is blank. How do I show a loading gif? public Browser() { InitializeComponent(); string clientURL = "www.imdb.com"; ChromiumWebBrowser browser = new ChromiumWebBrowser(clientURL); browser.Dock = DockStyle.Fill; toolStripContainer.ContentPanel.Controls.Add(browser); browser.RegisterJsObject("camera", new Camera()); } I looked...

Working with locally built web page in CefSharp

I have a CefSharp browser created in my Winform and I need to dynamically build an HTML page in memory and then have CefSharp render it. Ideally I would like to pass the constructor a string with the HTML in it but it is expecting a URL. The answer is...