-
Notifications
You must be signed in to change notification settings - Fork 38
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
Instantiation of classes which inherit from V8NativeObject in JS not working #13
Comments
Another sample does not throw an exception, but does not work as well:
|
Inheriting from V8NativeObject and registering it as a type to be used is not supported (yet). Just remove V8NativeObject and use the inject attribute (or better yet, it's faster to just include the engine in the constructor like this: |
Let me show you what is happening currently (and why what you are doing is not supported yet):
Handles are treated like remote values (which they are), and inheriting from it assumes you want to work with the value on the V8 side, not the object on the managed side. |
The following sample throws a
V8ExecutionErrorException
inTypeBinder::_BindTypeMembers
, becausehandle.Object
in line 1561 of V8Engine_Binding.cs returns null:As always, thank you. :-)
The text was updated successfully, but these errors were encountered: