Hi, Can anyone please explain the difference between the two? More concretely, if I'd like to add a function to the global template of an existing context, how should I do that? The documentation says: "Please note that changes to global proxy object prototype most probably would break VM---v8 expects only global object as a prototype of global proxy object." Does that mean I should not use Global()->GetPrototype()?
My code: Local<ObjectTemplate> globalTemplate = PrepareGlobalTemplate(); Handle<Context> context = Context::New(isolate, NULL, globalTemplate); Local<Object> prototype = PreparePrototype(); context->Global()->GetPrototype()->ToObject()->Set(String::NewFromUtf8(_isolate, "__proto__"), prototype); Is this the right way to go? Thanks. -- -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
