Hi,
Could somebody help me to figure out how to make c++ object available
within the frame's JS context?

Frame* frame = ...;

// Get context for the frame
v8::Local<v8::Context> context = V8Proxy::mainWorldContext(frame);

// Create v8 object v8::ObjectTemplate::New()
v8::Handle<v8::ObjectTemplate> obj = v8::ObjectTemplate::New();

// Linking passed object with the v8 object
obj->Set(v8::String::New("MyObject"), v8::ExternalWrap(MyObject));

// How to actually add the object to the context????
....

Thank you
Vlad

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to