Skip to content

robertkrimen/natto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

natto

-- import "github.com/robertkrimen/natto"

Package natto is an example/offshoot of otto that implements an event loop (supporting setTimeout/setInterval).

http://godoc.org/github.com/robertkrimen/natto

otto: http://github.com/robertkrimen/otto (http://godoc.org/github.com/robertkrimen/otto)

Usage

func Run

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 http://github.com/robertkrimen/godocdown

About

natto is an example/offshoot of otto that implements an event loop (supporting setTimeout/setInterval)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages