I have found the answer, SetNamedPropertyHandler can work on globle
ObjectTemplate. It's my mistake.
// Creates a new execution environment containing the built-in
// functions.
v8::Persistent<v8::Context> CreateShellContext() {
// Create a template for the global object.
v8::Handle<v8::ObjectTemplate> global = v8::ObjectTemplate::New();
// Bind the global 'print' function to the C++ Print callback.
//shang global->Set(v8::String::New("print"),
v8::FunctionTemplate::New(Print));
// Bind the global 'read' function to the C++ Read callback.
global->Set(v8::String::New("read"),
v8::FunctionTemplate::New(Read));
// Bind the global 'load' function to the C++ Load callback.
global->Set(v8::String::New("load"),
v8::FunctionTemplate::New(Load));
// Bind the 'quit' function
global->Set(v8::String::New("quit"),
v8::FunctionTemplate::New(Quit));
// Bind the 'version' function
global->Set(v8::String::New("version"),
v8::FunctionTemplate::New(Version));
global->SetNamedPropertyHandler(xxxxxxx);
return v8::Context::New(NULL, global);
}
On Dec 28, 1:38 am, "Yuri.Shang" <[email protected]> wrote:
> Who know the answer about the fowlling issue. ...Very very thanks.
>
> http://groups.google.com/group/v8-users/browse_thread/thread/53778057...
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users