robertkrimen / otto

A JavaScript interpreter in Go (golang)
http://godoc.org/github.com/robertkrimen/otto
MIT License
8.04k stars 584 forks source link

Can I interact with a JS script while it is running? #434

Closed HZHgagaga closed 1 year ago

HZHgagaga commented 2 years ago

For example, I have a javascript game loop, I use a Go grpc server to run it.

When the player sends an operation request, the Go grpc server will change the status of javascript game loop.

Can I do it with otto?

stevenh commented 1 year ago

You would need to interact with an otto instance but yes.