You probably want to take a second look at dom.js if you're not dead set on 
C++ because it's the closest to what you're describing. The thing about the 
DOM and IDL interfaces is that there's an enforced separation between the 
interface objects and the implementation objects. What this means is that 
you can load up the impl classes, which contain almost all the actual 
weight of the code, in one V8 context and then simply generate new 
interface objects along with a new V8 context each time. The interfaces are 
generated directly from IDL in fact, just converted to JS and with type 
adapters like OptionalBoolean, OptionalStringOrNull, etc. (directly 
translated from WebIDL spec). They use harmony proxies to present as normal 
objects and forward to the corresponding impl objects that are never 
directly exposed to sandboxed code.

It's important to note the distinction between something like jsdom and 
dom.js. jsdom is module that does pretty well in approximating a DOM-like 
environment. dom.js is a spec compliant (almost) host environment 
implemented in JavaScript that achieves full separation between 
implementation and interface. Not the same thing at all.

-- 
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

Reply via email to