I routinely access compiled c++ modules in js modules by passing in the
module name as an argument when creating the other module, like so:
var cppModule = require('./cppModule');
var cppModObject = new cppModule.SomeObject;
var jsModule = require('./jsModule');
var jsModObject = new jsModule.OtherObject(cppModObject);
And in my js I have something like:
var jsModule = function(otherModArg) {
var otherModuleObject = otherModArg;
...
}
My question is whether I can do the reverse, i.e. pass in some instantiated
js object into my c++ module and access that object within the c++. I'm
happy to post more code if it would be helpful...I haven't been able to
find any doc on this yet. Thanks!
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en