Handling all Set/Get operation of object using CefV8Accessor

Do not post support requests, bug reports or feature requests. Discuss CEF here. Non-CEF related discussion goes in General Discussion!

Handling all Set/Get operation of object using CefV8Accessor

Postby tuma » Tue May 15, 2012 5:12 am

I want to handle all Get/Set operation of a object (CefV8Value) using CefV8Accessor. I have a code like below. In this, whenever I access 'myObject.myProperty', my MyAccessor's Set/Get is getting called.
My question is, can I make MyAccessor as default Accessor for all the properties of a object?

Example: In Java Script, if I set/get any property value in 'myObject' (like 'myObject.yourProperty = "abc"' ), the call should come to my MyAccessor object.

class MyAccessor : public CefV8Accessor
{
....
};

// Create Accessor
CefRefPtr<CefV8Accessor> myAccessorObj = new MyAccessor();

// Create the new V8 object.
CefRefPtr<CefV8Value> dwObjectPtr = CefV8Value::CreateObject(NULL, myAccessorObj );

// Adding myObject in the global scope.
globalObj->SetValue("myObject", dwObjectPtr, V8_PROPERTY_ATTRIBUTE_NONE);

// Register an identifier whose access will be forwarded to the CefV8Accessor
dwObjectPtr->SetValue("myProperty", V8_ACCESS_CONTROL_DEFAULT, V8_PROPERTY_ATTRIBUTE_NONE);

Regards,
tumapathy
- tumapathy
tuma
Techie
 
Posts: 37
Joined: Fri May 11, 2012 3:26 am

Re: Handling all Set/Get operation of object using CefV8Accessor

Postby magreenblatt » Wed May 16, 2012 12:30 pm

Not currently supported. Please add an issue to the CEF issue tracker.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Handling all Set/Get operation of object using CefV8Accessor

Postby tuma » Thu May 17, 2012 12:06 am

- tumapathy
tuma
Techie
 
Posts: 37
Joined: Fri May 11, 2012 3:26 am


Return to CEF Discussion

Who is online

Users browsing this forum: No registered users and 145 guests