Sorry, I realize I wasn't using the correct terminology (we made our v8 design nearly a year ago, so it's been since I worked with V8).
What I meant by raw access to the V8 Engine was that I wanted raw access to the browser V8 context so that we can add our V8 object templates (that we've already created separately for scripting) to a webpage.
As an example, we have a V8 object template (in C++) named File with a readAll method. In our stand alone scripting console we can do:
- Code: Select all
var file = new File("D:/exampleData.txt");
windows.messageBox(file.readAll());
Now, we'd like to take our object template and be able to use it in the browser (by adding our object template to the browser context):
- Code: Select all
var file = new File("D:/exampleData.txt");
document.getElementById('example').innerHTML = file.readAll()
Rather than recreate this functionality using "native function", if we had the browser V8 context, we could add the objects directly.
Perhaps now you understand what we would like to do?
I should have refreshed myself on V8 terminology before posting - sorry about that.
If you don't understand, here's my last ditch attempt:
We have a library which contains various V8 object and function templates. We already use this library with an application which allows us to script programs using javascript.
Now what we want to do is easily add this library to the browser context so that we can use those same objects and templates in html/javascript without modifying the library [too much].