status-go/geth/jail/internal
Ivan Daniluk 6a096607cf Add FetchAPI support and fix loop race [upd] #289 (#293)
This PR adds Fetch API and fixes #289 by using concurrency safe Otto VM wrapper wherever it's possible. This involves new package geth/jail/vm that is used by jail and by our forked ottoext/{fetch/timers/loop} packages.

It also adds more tests that are supposed to be run with --race flag of go test.
2017-09-08 14:55:17 +03:00
..
fetch Add FetchAPI support and fix loop race [upd] #289 (#293) 2017-09-08 14:55:17 +03:00
loop Add FetchAPI support and fix loop race [upd] #289 (#293) 2017-09-08 14:55:17 +03:00
process Add FetchAPI support and fix loop race [upd] #289 (#293) 2017-09-08 14:55:17 +03:00
promise Add FetchAPI support and fix loop race [upd] #289 (#293) 2017-09-08 14:55:17 +03:00
timers Add FetchAPI support and fix loop race [upd] #289 (#293) 2017-09-08 14:55:17 +03:00
vm Add FetchAPI support and fix loop race [upd] #289 (#293) 2017-09-08 14:55:17 +03:00
LICENSE.md Add FetchAPI support and fix loop race [upd] #289 (#293) 2017-09-08 14:55:17 +03:00
README.md Add FetchAPI support and fix loop race [upd] #289 (#293) 2017-09-08 14:55:17 +03:00
main.go Add FetchAPI support and fix loop race [upd] #289 (#293) 2017-09-08 14:55:17 +03:00

README.md

ottoext

Originally based on github.com/deoxxa/ottoext

GoDoc

Overview

This package contains some extensions for the otto JavaScript interpreter. The most important extension is a generic event loop based on code from natto. The other extensions are setTimeout and setInterval support, Promise support (via native-promise-only, MIT license), and fetch support.

Examples

Take a look at the test files to see how the extensions work.

License

3-clause BSD. A copy is included with the source.