0

I am trying to create a Cef C++ Windows app that has no windows but can execute JavaScript. How can I obtain a JavaScript context if I'm running Cef headless in this way? I know I can get a context from a frame, and a frame from a browser, but if I have no window then I have no browser.

Running normally (with a window), I see that my OnAfterCreated(CefRefPtr<CefBrowser>) is called only after I invoke CefRunMessageLoop(), which I am trying to avoid. Any suggestions?

Kevin Hopps
  • 707
  • 3
  • 10
  • Where did you get that information from? The same `Browser/Frame` concepts apply regardless of `OSR` rendering. Under windows I'd generally advise you use `CefSettings.multi_threaded_message_loop`, then `CEF` will handle that for you. (Only works on `Windows`) – amaitland Jul 16 '15 at 00:44
  • 1
    If you just want the V8 Javascript engine, perhaps you'd be better off running it alone instead of from within Chromium via CEF? This might help: http://stackoverflow.com/questions/1802478/running-v8-javascript-engine-standalone – PhysicalEd Jul 16 '15 at 20:54

0 Answers0