mirror of
https://github.com/status-im/status-go.git
synced 2025-01-09 14:16:21 +00:00
6a096607cf
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.
25 lines
729 B
Markdown
25 lines
729 B
Markdown
ottoext
|
|
=======
|
|
|
|
Originally based on [github.com/deoxxa/ottoext](https://github.com/deoxxa/ottoext)
|
|
|
|
[![GoDoc](https://godoc.org/github.com/status-im/status-go/geth/jail/ottoext?status.svg)](https://godoc.org/github.com/status-im/status-go/geth/jail/ottoext)
|
|
|
|
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.
|