Hello,

I faced similar problem.  I have to create multiple properties with 
getter/setters written in c++.  In callbacks (JSNative getters and setters) I 
need to know which property was requested.  Actually I prefer to pass pointer 
to native structure instead of property name.  Can someone point me how to make 
slots for JSNative getters/setters and how to use them?

воскресенье, 29 марта 2015 г., 7:18:33 UTC+3 пользователь Boris Zbarsky написал:
> On 3/28/15 11:48 PM, obastemur wrote:
> > I have getter/setter implementation that makes a JS side object (an object 
> > created on the JS land, which doesn't have private slot or extra slots.
> 
> OK, that's fine.  I'm saying your getter or setter can have extra slots 
> to store the property name in.  I'm not talking about storing anything 
> like that on the receiver object.
> 
> > The getter/setter methods checks for the 'id' and returns / sets from/to 
> > external memory.
> 
> Right, so they'd continue doing that, using the id added to them at 
> creation time.
> 
> -Boris
_______________________________________________
dev-tech-js-engine-internals mailing list
dev-tech-js-engine-internals@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals

Reply via email to