cloudtrends / chromiumembedded

Automatically exported from code.google.com/p/chromiumembedded
1 stars 1 forks source link

Add support to object's SetAccessor() #224

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
With SetAccessor() supported, we can take advantage of properties of extended 
JavaScript objects which are implemented in C++.

Original issue reported on code.google.com by Yuankain...@gmail.com on 25 Apr 2011 at 3:37

GoogleCodeExporter commented 9 years ago
r215 added support for accessor-based properties in CefV8Value objects.

You just need to create an object with a CefV8Accessor interface that you 
implement to handle the Get() and Set() calls on your property and add the 
properties via 

bool CefV8Value::SetValue(const CefString& key, AccessControl settings, 
                              PropertyAttribute attribute)

See an example here where I create an object with x and y properties: 
http://code.google.com/p/chromiumembedded/source/browse/trunk/tests/unittests/v8
_unittest.cc?spec=svn215&r=215#402

Is this what you are looking for?

Original comment by gusver...@gmail.com on 26 Apr 2011 at 9:09

GoogleCodeExporter commented 9 years ago

Original comment by magreenb...@gmail.com on 29 Apr 2011 at 7:01