-- import "github.com/robertkrimen/natto"
Package natto is an example/offshoot of otto that implements an event loop (supporting setTimeout/setInterval).
https://godoc.org/github.com/robertkrimen/natto
otto: https://github.com/robertkrimen/otto (https://godoc.org/github.com/robertkrimen/otto)
func Run(src string) error
Run will execute the given JavaScript, continuing to run until all timers have finished executing (if any). The VM has the following functions available:
<timer> = setTimeout(<function>, <delay>, [<arguments...>])
<timer> = setInterval(<function>, <delay>, [<arguments...>])
clearTimeout(<timer>)
clearInterval(<timer>)
-- godocdown https://github.com/robertkrimen/godocdown