-
-
Notifications
You must be signed in to change notification settings - Fork 221
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
How to custom APIs? #28
Comments
I would also like to get such functionality! |
Being able to bind structs, functions, and values to variables in V8 would make this useful for the project I'm working on as well. Right now I'm trying to replace goja, and stumbled on this project. |
Currently this project does not expose a method to influence the global object in the created context. |
This is something I'm looking at adding as an API. Starting with #50, which will pave the way for more interop between v8 and Go. In terms of specifically Thanks for your patience. |
I'm interesting in adding custom APIs, such as adding a
console
API to print.My question is how to add callbacks from JS to Go using v8go. I've used J2V8 before which allows to add APIs to the global scope, such as an object for
console
with the methodlog
which calls back to Java in that case. Is that possible using this project?The ideal API would be something like (pseudo code):
In addition, it would be much more useful to actually be able to use
Value
with more than strings.The text was updated successfully, but these errors were encountered: