Hello! I've been very interested in the V8 JavaScript engine recently, so I fetched the source and built it successfully, so far so good. I also successfully compiled the Hello, World! program Google provides. I've also read the embedders guide. Other than that I can't find any documentation or examples that make any sense to me, I haven't even been able to add a function yet! I can't find any documentation and none of the guides Google provides gives any real information, do any of you know anything about the API? I understand contexts, handles and all of that from reading the guide but I can't find any material on adding functions, just this snippet from the embed page is remotely similar to the subject

// Create a template for the global object and set the
// built-in global functions.
Handle<ObjectTemplate> global = ObjectTemplate::New();
global->Set(String::New("log"), FunctionTemplate::New(LogCallback));

// Each processor gets its own context so different processors
// do not affect each other.
Persistent<Context> context = Context::New(NULL, global);

Nowhere does it explain how the function callback works and what parameter(s) it takes. If anyone could direct me somewhere or give me information that would be amazing! Thanks for any help!

Edited 3 Years Ago by NardCake

I found some things out by reverse engineering some of google's samples, still no reference though.

This article has been dead for over six months. Start a new discussion instead.