Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type V8 ¶
type V8 interface { // Eval evaluates the given JavaScript code 'src' and stores the result into 'res'. // The result is marshalled/unmarshalled by using JSON. // If the result is undefined, 'res' is not changed. // If the result cannot be stored into 'res' due to type mismatch, Eval returns the error. // If some JavaScript exception happens in runtime, Eval returns the exception as a Go error. Eval(src string, res interface{}) error // Call calls the JavaScript function specified by 'fun' with the given argument array 'args' // and stores the result into 'res'. // The arguments and the result are marshalled/unmarshalled by using JSON. // If the result is undefined, 'res' is not changed. // If the result cannot be stored into 'res' due to type mismatch, Eval returns the error. // If some JavaScript exception happens in runtime, Call returns the exception as a Go error. Call(fun string, args interface{}, res interface{}) error }
V8 is a Go interface for JavaScript engine V8
Click to show internal directories.
Click to hide internal directories.