-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A question about weak()'s return value #13
Comments
Can you show me a failing test case of what you would expect to be working? |
Sure, code always makes things more concrete :)
|
Motivation for this:
The 'ammo' module is a port of the Bullet physics simulation engine, created via trans-compilation of the C++ source to JS via emscripten. Unfortunately, since emscripten's execution model requires objects allocated with I'm therefore trying to wrap the constructors exposed by ammo with something like the code above, leveraging However, ammo chokes when I pass it objects that are wrapped as Another one that would be nice would be to satisfy |
The documentation says that the return value from weak(o) is an object that proxies all of o's properties and methods, so it seams I should be able to pass that around instead of 'o'. However, it doesn't look like it has o's prototype chain, which means it isn't a fully transparent replacement for o.
Is that true? And if so, is it by design, or is that something that can be fixed/added?
The text was updated successfully, but these errors were encountered: