- Code: Select all
global_obj = context->GetGlobal();
accessor = new MyV8Accesor();
obj = CefV8Value::CreateObject(accessor, NULL);
global_obj->SetValue("myval", obj, V8_PROPERTY_ATTRIBUTE_NONE);
I guess that code is correct in order to initialize the structure.
At this point I display the value of the object in the browser with alert(myval) JS expression, that returns '[object Object]'.
To set the value of the object I've tried the following expression unsuccessfully:
- Code: Select all
obj->SetValue("Hello world...", V8_ACCESS_CONTROL_DEFAULT, V8_PROPERTY_ATTRIBUTE_NONE);
But I'm blatantly failing at this because alert(..) keeps returning '[object Object]'.
I've tried also to use accessor->Set / accessor->Get unsuccessfully as well.
What code do I lack in order to set/get the value of the object?.
Thanks in advance.