3 ms·
What are the benefits of JSObjectSetPrivate? When is it useful?
by xutopia 16y ago
What are the benefits of JSObjectSetPrivate? When is it useful?
- demallien 16y agoIf you have an native (non-javascript) object that has been bound to a Javascript object, this is where the link between the two is stored. Basically on the C side of the bindings, when a native function is called, you receive the "this" object, and you can simply call JSObjectGetPrivate() to retrieve a pointer to the corresponding native object - assuming that you have previously called JSObjectSetPrivate...