Improve docs for JS engine slightly
This commit is contained in:
parent
75a9dea28f
commit
159d9d1062
|
@ -57,7 +57,8 @@ type ScriptInstance struct {
|
|||
onMessageDelete *otto.Value
|
||||
}
|
||||
|
||||
// New instantiates a new scripting engine
|
||||
// New instantiates a new scripting engine. The resulting object doesn't hold
|
||||
// any data or VMs initially. Only upon loading scripts, VMs are created.
|
||||
func New() *JavaScriptEngine {
|
||||
return &JavaScriptEngine{}
|
||||
}
|
||||
|
@ -176,6 +177,8 @@ func (engine *JavaScriptEngine) readScriptsRecursively(dirname string) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// SetErrorOutput sets the writer to which errors can be written from inside
|
||||
// the JavaScript engines.
|
||||
func (engine *JavaScriptEngine) SetErrorOutput(errorOutput io.Writer) {
|
||||
engine.errorOutput = errorOutput
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue