Hello, is it possible to create v8 context to execute arbitary js code without a frame/browser.
What i am trying to achieve is this. I have a game/simulation engine that uses cef for ui and interaction with the application. Some game/engine functions are bound as js functions and called from the page shown by CEF.
For instance, there is a level loading function in the engine which takes a filename as it's arg , and this function is bound as explained on the JavaScriptIntegration page. And there is a html level selection page rendered off-screen on using cef in to a texture and shown inside the engine window. Clicking links/buttons from the page calls the function like load_level("test_level.xml");(js) . All fine and working awesome.
I am now at the point where i would like add scripting capabilities to the engine. I could in theory embed v8, bind/add my engine functions, and create something like scheduler/script manager to run js files/scripts to program a game and/or parts of the game. But that makes 2 different v8s in the engine, one inside cef and other for running game scripts. One of the main reasons i want this is instead of something like lua is being able to use js functions created for use in ui to be also usable in the game itself.
Now for my question, is it possible to use cef's v8 without a frame/window/browser(or whatever) for the purpose explained above? Or should i just spin my own v8 integration with engine? Or maybe just use a dummy frame window and do not show it on screen at all?
(ps. this is in fact not a game but a medical simulation/visualization app, so scripting could really be handy.)